View gist:1751850
<html lang="en" xml:lang="en" xmlns="">
<title>jQuery DOM index testing</title>
<style type="text/css">
#wrap .rolloverlayer {
background: #eaeaea;
height: 100px;
width: 200px;
margin: 0 0 15px;
View greetings.js
* Simple module for greeting people
var Tidy = require('./tidy');
var Greetings = function() { }
Greetings.prototype.hello = function(who) {
who = Tidy.trim(who);
return this.hello(who);
View gist:1042312
# network download speed
wget > /dev/null
# disk speed
dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
View gist:958723
# list only conflicts from a merge dry run
svn merge <SVN MERGE FROM> ./ --dry-run | grep -P '^(?=.{0,6}C)'
tail -n 100 /var/log/xferlog | awk '{print $14}' | sort -u | wc -l
# total non static pages a bot has scraped
awk '$7!~/css|png|jpeg|jpg|gif|js|ico/ {print $7}' /var/log/nginx/access.log | wc -l
# output error messages
awk '$3!~/notice|info/' error.log
View rc.lua
-- Rob's Mods
awful.key({ modkey, "Shift" }, "z", function () awful.util.spawn("emacs") end),
-- awful.key({ modkey, "Shift" }, "e", function () awful.util.spawn("xfce4-terminal -x sup") end),
awful.key({ modkey, "Shift" }, "f", function () awful.util.spawn("firefox") end),
awful.key({ modkey, "Shift" }, "g", function () awful.util.spawn("chromium") end),
awful.key({ modkey, "Shift" }, "o", function () awful.util.spawn("opera") end),
awful.key({ modkey, "Shift" }, "m", function () awful.util.spawn("xterm mocp") end),
awful.key({ modkey, "Shift" }, "x", function () awful.util.spawn("thunar") end),
awful.key({ modkey }, "c", function () awful.util.spawn("gedit") end),
awful.key({ modkey, "Shift" }, "t", function () awful.util.spawn("xterm -fg AliceBlue -bg grey10") end),
View .emacs
(add-to-list 'load-path "~/bin/emacs")
(setq-default indent-tabs-mode nil)
(setq standard-indent 4)
(setq tab-width 4)
(setq c-default-style "k&r" c-basic-offset 4)
; SUP email
(autoload 'post-mode "post.elc" "post-mode." t)
View gist:554975
# When doing some heavy refactoring, you may need to update the package name
# within the code's docs. Snippet below can do this on bulk with grep and sed
grep "@package OldPackageName" ./* -lR --exclude-dir=".svn" | xargs sed -i 's/@package OldPackageName/@package NewPackageName/g'