This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
NTW = { | |
1 => "one", | |
2 => "two", | |
3 => "three", | |
4 => "four", | |
5 => "five", | |
6 => "six", | |
7 => "seven", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
NTW = { | |
1 => "one", | |
2 => "two", | |
3 => "three", | |
4 => "four", | |
5 => "five", | |
6 => "six", | |
7 => "seven", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
=begin | |
INSTALL: | |
curl http://github.com/defunkt/gist/raw/master/gist.rb > gist && | |
chmod 755 gist && | |
sudo mv gist /usr/local/bin/gist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
def subsume_modules(*vendor_modules) | |
options = vendor_modules.pop | |
options[:modules] = vendor_modules + Array(options[:additional_modules]) | |
options[:module_names] = options[:modules].map{|m| m.capitalize.gsub(/_[a-z]/){|s| s[-1..-1].upcase}} | |
vendor_modules.each do |vendor_module| | |
copy_module vendor_module, options | |
subsume_module vendor_module, options | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Come see my teammate Derek Collison talk about the PaaS we've been building at VMware | |
http://www.rubyconf.org/presentations/8 | |
⚡ $ vmc -h | |
version # version | |
help, -h # show usage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* user.watch v1.0: Cross-browser user.watch | |
* From http://code.eligrey.com/object.watch/ | |
* | |
* By Elijah Grey, http://eligrey.com | |
* Tweaked by Trevor Lalish-Menagh, http://trevmex.com | |
* | |
* A shim that partially implements object.watch and object.unwatch | |
* in browsers that have accessor support. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'rack' | |
class Object | |
def webapp | |
class << self | |
define_method :call do |env| | |
func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?) | |
[200, {}, send(func, *attrs)] | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// you type this | |
.bg-all-gradient-types | |
+background-image(image-url("icon.png"), linear-gradient(top left, #ddd, #aaa), radial-gradient(center center, #ddd, #aaa 100px)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$experimental-support-for-svg: true; | |
@import "compass/css3/version-2"; | |
h1 { | |
border: 8px solid black; | |
@include border-image(radial-gradient(#0f0,#f00) 100 stretch); | |
@include background-image(linear-gradient(#0ff, #00f)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){s=document.createElement('script');s.type='text/javascript';s.src='https://gist.github.com/raw/701397/typekit-colophon.js';document.getElementsByTagName('head').item(0).appendChild(s);void('')})(); |