Skip to content

Instantly share code, notes, and snippets.

lxneng / gist:741932
Created December 15, 2010 13:21
install PostgreSQL 9 in Mac OSX via Homebrew
View gist:741932
install PostgreSQL 9 in Mac OSX via Homebrew
Mac OS X Snow Leopard
System Version: Mac OS X 10.6.5
Kernel Version: Darwin 10.5.0
Install notes for PostgreSQL 9.0.1 install using Homebrew:
sh-3.2# brew install postgresql
webdevwilson / XboxGamercard.class.php
Created January 22, 2011 19:45
PHP API for Xbox Live
View XboxGamercard.class.php
define('URL_PREFIX', '');
define('URL_AFFIX', '.card');
define('SUBSCRIPTION_GOLD', 'Gold');
define('SUBSCRIPTION_SILVER', 'Silver');
class XboxGamercard {
public $gamertag;
anonymous /
Created October 3, 2011 02:24
Python script to get Xbox Live friends
import urllib
import urllib2
import re
import json
import htmlentitydefs
import cookielib
LOGIN,PASSWD = "", "yourpassword"
Jabbslad / xbox.js
Created January 21, 2012 19:55
Xbox Live Scraper For PhantomJS
View xbox.js
Copyright (c) 2012 Jabbslad
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
smeranda / facebook_like-box_responsive.css
Created May 1, 2012 20:37
Flexible width layout for Facebook Like Box/Activity Stream to use in Responsive Designs
View facebook_like-box_responsive.css
Make the Facebook Like box responsive (fluid width)
/* This element holds injected scripts inside iframes that in some cases may stretch layouts. So, we're just hiding it. */
#fb-root {
display: none;
proudlygeek / client_cors.js
Created July 17, 2012 20:48
View client_cors.js
url: "",
success: function(data) {
piscisaureus /
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

dommmel / capture_screenshot.js
Created January 8, 2013 10:00
Script to take full page screenshots using phantomJs via CasperJs. Run via ```casperjs capture_screenshot.js```
View capture_screenshot.js
var casper = require('casper').create({
viewportSize: {width: 950, height: 950}
casper.start('', function() {
this.captureSelector('/tmp/pp.png', 'body');
aras-p / preprocessor_fun.h
Last active November 21, 2023 15:50
Things to commit just before leaving your job
View preprocessor_fun.h
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
mccahill / config.js
Last active November 18, 2021 19:00 — forked from jeffrafter/server.js
Example of a node OAuth (Twitter) and OAuth2 (Google Calendar) client that works with the version 3 Express framework. This assumes you have a config.js file holding the keys and secrets
View config.js
module.exports = {
'PORT': 80,
'TWITTER_CONSUMER_KEY': 'your-consumer-key-here',
'TWITTER_CONSUMER_SECRET': 'your-secret-here',
'GOOGLE_APP_ID': 'your-app-id-here',
'GOOGLE_CONSUMER_SECRET': 'your-consumer-secret-here',