Skip to content

Instantly share code, notes, and snippets.

@LeverOne
LeverOne / LICENSE.txt
Created October 24, 2011 04:17 — forked from jed/LICENSE.txt
generate random v4 UUIDs (107 bytes)
DO WTF YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alexey Silin <pinkoblomingo@gmail.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WTF YOU WANT TO PUBLIC LICENSE
@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:

@digitalextremist
digitalextremist / handler-class.rb
Created April 23, 2013 06:42
Partial ( somewhat messy )snippet of WebSocket support implemented in Reel using Rack hijack_io's pre-header form. Client side is using portal.js and jQuery Mobile. Mu is a base class of utilities (such as Mu.debug to output data to the console) and Mu.socket to manipulate the socket itself, once captured. Ma is an instance of Sinatra::Base with…
require 'forwardable'
require "websocket/protocol/hybi"
module ProtocolAlias
def << data
text data
end
end
class Mu