Skip to content

Instantly share code, notes, and snippets.

@hisea
hisea / private.xml
Created October 17, 2012 02:46
Happy Hacking Keyboard remap file for Keyremap4macbook
<?xml version="1.0"?>
<root>
<devicevendordef>
<vendorname>PFU</vendorname>
<vendorid>0x0853</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>HHK</productname>
@hisea
hisea / gist:3363163
Created August 15, 2012 20:06
Rake task with param and dependency
require 'resque/tasks'
namespace :ns do
desc "test task accepts param"
task :task, [:param] => [:environment] do |t,args|
abort "Please specify a param!" unless args[:param]
puts args[:param]
end
end
@hisea
hisea / nginx
Created January 1, 2012 23:37
ubuntu passenger nginx init.d script
sudo cp nginx /etc/init.d/
sudo update-rc.d nginx defaults
sudo chmod +x /etc/init.d/nginx
/etc/init.d/nginx start
@hisea
hisea / gist:1548606
Created January 1, 2012 23:08
install node.js
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
@hisea
hisea / git pretty log
Created December 22, 2011 05:25
.gitconfig
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
#git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
@hisea
hisea / togglable.html
Created December 30, 2010 23:09
togglable comment box
<a href="javascript:void(0)" class="toggleLink" data-mid="<%= message.id %>">Link to my partial</a>
<div id="add_comment<%=message.id%>" style="display:none">
Comment box
</div>