Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| require 'sinatra' | |
| require 'redis' | |
| require 'json' | |
| require 'date' | |
| class String | |
| def &(str) | |
| result = '' | |
| result.force_encoding("BINARY") |
| #!/bin/sh | |
| export PATH=/bin:/usr/bin:/sbin:/usr/sbin | |
| usage=$( | |
| cat <<EOF | |
| $0 [OPTIONS] start/stop | |
| -s set speed default 256Kbit/s | |
| -p set port default 3000 | |
| -d set delay default 350ms |
| ; A REPL-based, annotated Seesaw tutorial | |
| ; Please visit https://github.com/daveray/seesaw for more info | |
| ; | |
| ; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers | |
| ; Seesaw's basic features and philosophy, but only scratches the surface | |
| ; of what's available. It only assumes knowledge of Clojure. No Swing or | |
| ; Java experience is needed. | |
| ; | |
| ; This material was first presented in a talk at @CraftsmanGuild in | |
| ; Ann Arbor, MI. |
| var EventEmitter = require("events").EventEmitter, | |
| redis = require("redis"), | |
| dateformat = require("dateformat"); | |
| function population32(x) | |
| { | |
| x -= ((x >> 1) & 0x55555555); | |
| x = (((x >> 2) & 0x33333333) + (x & 0x33333333)); | |
| x = (((x >> 4) + x) & 0x0f0f0f0f); | |
| x += (x >> 8); |
| auth = OAuthHandler(CLIENT_ID, CLIENT_SECRET, CALLBACK) | |
| auth.set_access_token(ACCESS_TOKEN) | |
| api = API(auth) | |
| venue = api.venues(id='4bd47eeb5631c9b69672a230') | |
| stopwords = nltk.corpus.stopwords.words('portuguese') | |
| tokenizer = RegexpTokenizer("[\w’]+", flags=re.UNICODE) | |
| license: gpl-3.0 |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
| 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 WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| package b | |
| import "testing" | |
| // SIZE=1000 results (core i5 late 2011 mac mini, 10.7.3) | |
| // % go test -v -run='XXX' -bench='.' | |
| // PASS | |
| // BenchmarkUpdate 500000 2996 ns/op | |
| // BenchmarkManual 500000 4642 ns/op | |
| // BenchmarkUnroll 1000000 2824 ns/op |
| require 'formula' | |
| class Varnish3 <Formula | |
| url 'http://repo.varnish-cache.org/source/varnish-3.0.2.tar.gz' | |
| homepage 'http://www.varnish-cache.org/' | |
| md5 'c8eae0aabbe66b6daabdf3a1f58cd47a' | |
| depends_on 'pkg-config' => :build | |
| depends_on 'pcre' => :build |