Skip to content

Instantly share code, notes, and snippets.

View irohiroki's full-sized avatar

Hiroki Yoshioka irohiroki

View GitHub Profile
@irohiroki
irohiroki / gist:909284
Created April 8, 2011 04:27
jQuery Mobile Red theme for Buttons
.ui-btn-up-f, .ui-btn-hover-f, .ui-btn-down-f {
color: white;
font-weight: bold;
text-decoration: none; }
.ui-btn-up-f {
border: 1px solid #711414;
background: #ab2525;
text-shadow: 0 -1px 1px #711414;
background-image: -moz-linear-gradient(top, #c44f4f, #ab2525);
diff --git a/lib/guard/spork/fake_spawn.rb b/lib/guard/spork/fake_spawn.rb
new file mode 100644
index 0000000..8551778
--- /dev/null
+++ b/lib/guard/spork/fake_spawn.rb
@@ -0,0 +1,7 @@
+module FakeSpawn
+ if RUBY_VERSION < '1.9'
+ def spawn(cmd)
+ system(cmd + ' >/dev/null 2>&1 < /dev/null &')
require 'ruby-debug'
require 'socket'
require 'forwardable'
class SporkDebugger
DEFAULT_PORT = 10_123
HOST = '127.0.0.1'
extend Forwardable
def_delegators :state, *[:prepare_debugger, :initialize]
@irohiroki
irohiroki / gist:805622
Created February 1, 2011 09:14
A shell function that clones a github project into a directory of its account name.
# clone a github project
function clone {
# check arguments
acc=${1%%/*}
prj=${1##*/}
if [ -z "$acc" -o -z "$prj" ] ; then
echo 'usage: clone <github_account>/<project>'
return 1
fi
mysql> select * from items;
+------+----+
| name | id |
+------+----+
| aaa | 1 |
| bbb | 2 |
| ccc | 3 |
| ddd | 4 |
+------+----+
4 rows in set (0.00 sec)