Skip to content

Instantly share code, notes, and snippets.

View shazinahmed's full-sized avatar

Shazin Shafi Ahamed shazinahmed

View GitHub Profile
@shazinahmed
shazinahmed / gist:5894316
Last active December 19, 2015 03:59
Apache mod_proxy with Spring Security
<VirtualHost *:80>
ServerName public.server.name
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
@shazinahmed
shazinahmed / gist:5894181
Last active November 30, 2020 11:19
Google Places Autocomplete font size/style
/*
The div that holds all the lines
*/
.pac-container {
color: #d9d9d9;
}
/*
class for each line of the result
*/
@shazinahmed
shazinahmed / url2png_md2.java
Created August 27, 2012 02:58
url2png md5 hash token generation code
public byte[] generateToken(String url,String apiKey) throws NoSuchAlgorithmException{
MessageDigest md = MessageDigest.getInstance("MD5");// throws NoSuchAlgorithmException
StringBuffer buffer = new StringBuffer(url);
buffer.append(apiKey);//prepare the string to be hashed url+APIKey
byte[] token = md.digest(buffer.toString().getBytes());
return token ;
}