Skip to content

Instantly share code, notes, and snippets.

@philfreo
philfreo / gist:7257723
Created October 31, 2013 21:44
Facebook Perl source code from 2005. When browsing around thefacebook.com in 2005 the server spit out some server-side source code rather than running it. I believe this was for their old graph feature that let you visualize the graph between all your friends. The filename is `mygraph.svgz` and contains some gems such as a commented out "zuck" d…
#!/usr/bin/perl
use Mysql;
use strict;
use vars qw($school_name);
use vars qw($pass);
require "./cgi-lib.pl";
@EndangeredMassa
EndangeredMassa / .bashrc
Last active October 6, 2015 08:48
Tmux Setup
alias tm="~/.tmux/tmux.sh"
@arlodesign
arlodesign / .htaccess
Created January 16, 2012 17:53
Schedule your 12-hour SOPASTRIKE in Apache
## BEGIN SOPASTRIKE
## Add to the top of your .htaccess file
<IfModule mod_rewrite.c>
RewriteEngine on
# The first time is listed as greater than 7:59:59am.
# The second time is less than 8:00:00pm (20:00:00).
#
@siffring
siffring / gist:946604
Created April 28, 2011 15:42
ExpressionEngine list of new members by month
{!-- Displays the number of new ExpressionEngine members by month --}
{exp:query sql="select count(*) AS total, month(from_unixtime(join_date)) as month, year(from_unixtime(join_date)) as year from exp_members group by year, month order by year DESC, month DESC"}
<br/>{year}-{month}: {total}
{/exp:query}
@wbailey
wbailey / databases.rake
Created February 11, 2011 08:58
ActiveRecord migrations outside of Rails
require 'yaml'
require 'logger'
require 'active_record'
namespace :db do
def create_database config
options = {:charset => 'utf8', :collation => 'utf8_unicode_ci'}
create_db = lambda do |config|
ActiveRecord::Base.establish_connection config.merge('database' => nil)