Skip to content

Instantly share code, notes, and snippets.

@zzarbi
zzarbi / ssgraphite.conf
Created March 29, 2013 20:49
Virtual Host for graphite
# This needs to be in your server's config somewhere, probably
# the main httpd.conf
# NameVirtualHost *:80
# This line also needs to be in your server's config.
# LoadModule wsgi_module modules/mod_wsgi.so
# You need to manually edit this file to fit your needs.
# This configuration assumes the default installation prefix
# of /opt/graphite/, if you installed graphite somewhere else
@zzarbi
zzarbi / gist:3759241
Created September 21, 2012 01:13
Bad code
if($magicHash !== false && $fullName == 'phone_call_index'){
// create equivalent array with hashes
$fullAllowedHash = array();
foreach ($fullAllowed as $i => $val) {
$fullAllowedHash[$i] = md5($val);
}
// if the hash is in the array we don't need a popup
if(in_array($magicHash, $fullAllowedHash)){
return;