Skip to content

Instantly share code, notes, and snippets.


William Wong Garay willywg

View GitHub Profile
Sebfh / gist:4585872
Last active Sep 26, 2018
javascript number to currency á la rails
View gist:4585872
function number_to_currency(number, options) {
try {
var options = options || {};
var precision = options["precision"] || 2;
var unit = options["unit"] || "\u20AC";
var separator = precision > 0 ? options["separator"] || "." : "";
var delimiter = options["delimiter"] || ",";
var parts = parseFloat(number).toFixed(precision).split('.');
return unit + number_with_delimiter(parts[0], delimiter) + separator + parts[1].toString();
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
sr75 / run-ie-7-8-9-virtualbox-on-osx.txt
Created Mar 15, 2012
Run IE 7, 8, and 9 in Mac OS X
View run-ie-7-8-9-virtualbox-on-osx.txt
# the admin password for all of the IE VMs is “Password1″ without the quotes, it's also used for the password hints
1) Install VirtuaBox on your mac
2) Decide which versions of Internet Explorer you want to download and install – each version of Internet Explorer is contained within a separate virtual machine that runs within VirtualBox. In other words, if you want to run Internet Explorer 7, 8, and 9, you will need to download three separate VM’s, which may take a while so keep that in mind. Select the text below and copy it:
# Install ALL versions of Internet Explorer: IE 7, IE 8, and IE 9 (for now this script will also pull down a IE 6 vm with windows xp)
willywg /
Created Aug 9, 2011
devise I18n file in spanish for devise 1.4.2
# Additional translations at
# Translation by William Wong Garay (willywg)
expired: "ha expirado, por favor solicita una nueva"
not_found: "no se encontró"
already_confirmed: "ya fue confirmado, por favor intenta iniciar sesión"
not_locked: "no estaba bloqueado"
jjb / gist:950975
Created May 1, 2011
Using whenever with capistrano and bundler in multiple environments
We couldn’t find that file to show.
View capybara cheat sheet
=Clicking links and buttons=
click_link('Link Text')
click('Link Text') # Click either a link or a button
click('Button Value')