Skip to content

Instantly share code, notes, and snippets.

View mogox's full-sized avatar
🇲🇽
🤖

Enrique Carlos Mogollan mogox

🇲🇽
🤖
View GitHub Profile
@jbaylor-rpx
jbaylor-rpx / salesforce_id.rb
Created May 14, 2012 03:35
Convert Salesforce IDs from 15 character to 18 characters (and back)
# Salesforce originally used case-sensitive 15-character IDs.
# Later they added three error-correcting characters to make their 18-character ID.
# This class converts from one to the other and back
#
# Usage:
# SalesforceId.convert('a0D30000001n7Pi') => 'a0D30000001n7PiEAC'
# OR
# SalesforceId.convert('a0D30000001n7PiEAC') => 'a0D30000001n7Pi'
# SalesforceId.convert('A0d30000001N7pIeAc') => 'a0D30000001n7Pi'
#

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@mikegehard
mikegehard / gist:954537
Created May 4, 2011 00:35
Waiting until all jquery ajax calls are done
//Useful if you have a slow CI server...
When /^I wait until all Ajax requests are complete$/ do
wait_until do
page.evaluate_script('$.active') == 0
end
end
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.