This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script = """ | |
local callcount = tonumber(ARGV[1]) or 0 | |
local maxcps = tonumber(ARGV[2]) or 0 | |
local expected = (tonumber(redis.call('GET', KEYS[1])) or 0) + callcount | |
if expected > maxcps then | |
return nil | |
else | |
redis.call('incrby', KEYS[1], callcount) | |
redis.call('expire', KEYS[1], 10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## | |
# to install : | |
# $ curl -L "https://gist.github.com/gists/path/to/raw/gist/nokogiri.sh" | sh | |
set -e | |
echo "installing libraries" | |
brew install libxml2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
trap onexit 1 2 3 15 ERR | |
function onexit { | |
echo "## cleaning installation folder" | |
pushd /tmp | |
rm -rf libev-mirror | |
rm -rf zeromq-2.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Add a bookmark to this | |
javascript:(function(b){for(var c=0,a=b.length;c<a;c++){var d=b[c];if(d.rel==="stylesheet"||d.type==="text/css"){var e=d.href.split("?",2);d.href=e[0]+"?"+((e.length===2)?e[1]+"&":"")+(new Date().getTime())}}})(document.getElementsByTagName("link")); | |
*/ | |
;(function (links) { | |
for (var i = 0, len = links.length; i < len; i++) { | |
var link = links[i]; | |
if (link.rel === 'stylesheet' || link.type === 'text/css') { |