Skip to content

Instantly share code, notes, and snippets.

View jhsu's full-sized avatar
💀
compliant with future standards

Joe Hsu jhsu

💀
compliant with future standards
  • MineHub
  • New York, NY
  • X @jhsu
View GitHub Profile
diff --git lib/redis-store.rb lib/redis-store.rb
index 2ee9337..463fe91 100644
--- lib/redis-store.rb
+++ lib/redis-store.rb
@@ -1,5 +1,5 @@
require "redis"
-require "dist_redis"
+require "redis/distributed"
require "redis/redis_factory"
require "redis/marshaled_redis"
development:
count: 1
queue: "*"
qa:
count: 2
queue: "*"
demo:
count: 2
/* CSS Mini Reset */
html, body, div, form, fieldset, legend, label {
margin: 0;
padding: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
javascript:for(i=0;i<document.styleSheets.length;i++) {
void(document.styleSheets.item(i).disabled=true);
}
el = document.getElementsByTagName('*');
for ( i=0; i<el.length; i++) {
void(el[i].style.cssText = '');
}
bash < <( curl http://rvm.beginrescueend.com/install/tmux )
bash < <( curl http://rvm.beginrescueend.com/install/libevent )
# # Default global options.
set -g status-right "%H:%M" # %d-%b-%y
set -g bell-action none
# set -g lock-after-time 1800
# Default global window options.
setw -g remain-on-exit off
setw -g window-status-current-attr "underscore"
setw -g monitor-activity
module RockNRole
def self.included(base)
base.send :extend, ClassMethods
end
module ClassMethods
def has_rockin_roles
send :include, InstanceMethods
end
end
# Find out if a number is prime
#
# Usage: 1.prime?
#
class Integer
def prime?
return false if self == 1
(2..(self-1)).each do |number|
return false if self % number == 0
end
#!/usr/bin/env ruby
#
# Usage:
# cd /git/project/directory
# git hub-diff 223d60f5486075e74851075fcfeb366d45c17d8b 13c86f00cbfe820c415b46bfd19268284db2a274
# Future features:
# * generate SHAs from refs
# * launchy support
require 'rubygems'
#!/usr/bin/env ruby
# Author: Joseph "jshsu" Hsu <[email protected]>
# File: roll.rb
#
# weechat script to roll a die
#
# Copyright (C) 2010 Joseph Hsu
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by