redis @qrush
smart cache, job queues, high speed analytics
> touch normal.txt
> stat -f "%Sp" normal.txt
#!/bin/bash | |
# from http://snippets.dzone.com/posts/show/10897 | |
# source this file from bashrc | |
GOT_AGENT=0 | |
for FILE in $(find /tmp/ssh-???*[0-9]* -type s -user ${LOGNAME} -name "agent.[0-9]*") | |
do | |
SOCK_PID=${FILE##*.} |
var redis = require('redis'); | |
var client = redis.createClient(); | |
client.set('test', 'hello, world!'); | |
console.log(client.get('test')); | |
// => undefined | |
client.get('test', redis.print); | |
// => Reply: hello, world! |
#!/usr/bin/env ruby | |
require 'fileutils' | |
require 'colorize' | |
MUSIC_DIR="/home/jshsu/Media/music/" | |
songs = Dir.glob("*.mp3").select do |song| | |
(( Time.now - File.ctime(song) ) / 60 / 60 / 24) >= 1 | |
end |
awk 'function wl() {\ | |
rate=64000; \ | |
return (rate/160)*(0.87055^(int(rand()*10)))}; \ | |
BEGIN {\ | |
srand(); \ | |
wla=wl(); \ | |
while(1) {\ | |
wlb=wla; \ | |
wla=wl(); \ | |
if (wla==wlb) \ |
alias emigrate="$EDITOR db/migrate/$(ls -lp db/migrate | tail -1 | awk '{print $NF}')" |
require 'cinch' | |
require 'open-uri' | |
require 'simple-rss' | |
require 'twitter' | |
Twitter.configure do |config| | |
end | |
class WnyGroup |
#!/usr/bin/env bash | |
for i in {1..572}; do | |
curl -O "http://thenounproject.com/site_media/zipped/svg_$i.zip" | |
done | |
unzip '*.zip' |
for (;;);{"error":0,"errorSummary":"","errorDescription":"","errorIsWarning":false,"silentError":0,"payload":null,"css":["fiMEj","Z87wv"],"onload":["(function(){fc_expand(this, false);;}).apply(DOM.find(this.getRelativeTo(),\"textarea\"))","(function(){DOM.replace(this, HTML(\"\\u003cbutton class=\\\"like_link stat_elem as_link\\\" title=\\\"Like this item\\\" type=\\\"submit\\\" name=\\\"like\\\" onclick=\\\"fc_click(this, false); return true;\\\">\\u003cspan class=\\\"default_message\\\">Like\\u003c\\\/span>\\u003cspan class=\\\"saving_message\\\">Unlike\\u003c\\\/span>\\u003c\\\/button>\"));;}).apply(DOM.find(this.getRelativeTo(),\".like_link\"))","(function(){DOM.replace(this, HTML(\"\\u003cli class=\\\"ufiItem uiUfiLike\\\">\\u003cdiv class=\\\"UIImageBlock clearfix\\\">\\u003ca class=\\\"UIImageBlock_Image UIImageBlock_ICON_Image\\\" tabindex=\\\"-1\\\">\\u003clabel onclick=\\\"this.form.like.click();\\\">\\u003ci class=\\\"img sp_axw93h sx_0d9f5d\\\" title=\\\"Like this item\\\">\\u003c\\\/i>\\u003c\\\ |