Skip to content

Instantly share code, notes, and snippets.

View jacquescrocker's full-sized avatar

Jacques Crocker jacquescrocker

View GitHub Profile
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@scottjehl
scottjehl / jqm-self-init-a-widget.js
Created July 8, 2011 14:29
Self-init a jQuery Mobile plugin
// First, let's define a widget/plugin called "foo"
// Either using jQuery's $.fn plugin namespace, for simple stateless plugins...
$.fn.foo = function(){
// In this scope, this refers to the element on which the plugin foo() was called
// manipulate it and return this at the end, so it can be chainable
};
#!/usr/bin/env sh
source "$HOME/.rvm/scripts/rvm"
rvm default
__rvm_load_rvmrc
cd .
export BUNDLE_PATH=$GEM_HOME
exec ruby "$@"
# Mongoid association matchers for RSpec 2.x and 1.x
#
# Save this file to your spec/support directory
#
# Usage:
#
# describe User do
# it { should reference_one :profile }
# end
#
require 'json'
require 'open-uri'
class DependencyChecker
def initialize(*gems)
@gems = gems.flatten
@dep_cache = {}
end
def all_dependencies