Skip to content

Instantly share code, notes, and snippets.

View outsideris's full-sized avatar

Outsider outsideris

View GitHub Profile
@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:

@mrdoob
mrdoob / RequestAnimationFrame.js
Created February 22, 2011 14:50
Provides requestAnimationFrame in a cross browser way.
/**
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish / http://paulirish.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
@x1024
x1024 / gist:794143
Created January 24, 2011 22:46
NodeJS Socket.IO logic test
var http = require('http'),
should = require('should'),
io = require('socket.io'),
decode = require('.npm/socket.io/0.6.8/package/lib/socket.io/utils').decode,
encode = require('.npm/socket.io/0.6.8/package/lib/socket.io/utils').encode,
WebSocket = require('.npm/socket.io/0.6.8/package/support/node-websocket-client/lib/websocket.js').WebSocket;
exports['Socket.IO mocking'] = function(assert){
var _server = require('http').createServer(function(){});
// A mock client object.
@ry
ry / https-hello-world.js
Created January 4, 2011 00:03
new node https api
// curl -k https://localhost:8000/
var https = require('https');
var fs = require('fs');
var options = {
key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
};
https.createServer(options, function (req, res) {
@retronym
retronym / mvn2sbt.scala
Created May 3, 2010 17:17
mvn2sbt: quick hack to turn <dependencies> into SBT
object scala {
val version = "SCALA_VERSION$"
}
val xml = <dependencies>
<dependency>
<groupId>org.scalanlp</groupId>
<artifactId>scalala_${scala.version}</artifactId>
<version>0.3.1</version>
</dependency>