Skip to content

Instantly share code, notes, and snippets.

@piscisaureus
piscisaureus / pr.md
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 = git@github.com:joyent/node.git

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:

@proudlygeek
proudlygeek / client_cors.js
Created July 17, 2012 20:48
JSONP Vs. CORS
// http://jsfiddle.net/suBPQ/
$.ajax({
url: "http://api_test_server.proudlygeek.c9.io/",
success: function(data) {
console.log(data);
}
});​
@smeranda
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
/*
Make the Facebook Like box responsive (fluid width)
https://developers.facebook.com/docs/reference/plugins/like-box/
*/
/* This element holds injected scripts inside iframes that in some cases may stretch layouts. So, we're just hiding it. */
#fb-root {
display: none;
}
@Jabbslad
Jabbslad / xbox.js
Created January 21, 2012 19:55
Xbox Live Scraper For PhantomJS
/*
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
anonymous
anonymous / xbl.py
Created October 3, 2011 02:24
Python script to get Xbox Live friends
#!/usr/local/bin/python
import urllib
import urllib2
import re
import json
import htmlentitydefs
import cookielib
LOGIN,PASSWD = "yourlogin@someemail.com", "yourpassword"
@webdevwilson
webdevwilson / XboxGamercard.class.php
Created January 22, 2011 19:45
PHP API for Xbox Live
<?php
define('URL_PREFIX', 'http://gamercard.xbox.com/en-US/');
define('URL_AFFIX', '.card');
define('SUBSCRIPTION_GOLD', 'Gold');
define('SUBSCRIPTION_SILVER', 'Silver');
class XboxGamercard {
public $gamertag;
@lxneng
lxneng / gist:741932
Created December 15, 2010 13:21
install PostgreSQL 9 in Mac OSX via Homebrew
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