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
" " command-line editing | |
" move-commands | |
cnoremap <C-A> <Home> | |
cnoremap <C-E> <End> | |
cnoremap <C-B> <Left> | |
cnoremap <C-F> <Right> | |
cnoremap <Esc>b <S-Left> | |
cnoremap <Esc>w <S-Right> | |
cnoremap <Esc>e <S-Right> | |
cnoremap <Esc>B <C-Left> |
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
$ cloud provision -d | |
bootstrapping: 192.168.133.128 | |
Adding default gem dependencies | |
/Users/nmurray/Programming/Ruby/poolparty/bin/../lib/poolparty/helpers/../../../bin/../lib/../vendor/gems/suitcase/lib/suitcase/zipper.rb:53:in `add': undefined method `each' for nil:NilClass (NoMethodError) | |
from /Users/nmurray/Programming/Ruby/poolparty/bin/../lib/poolparty/helpers/../../../bin/../lib/../vendor/gems/suitcase/lib/suitcase/zipper.rb:82:in `gems' | |
from /Users/nmurray/Programming/Ruby/poolparty/bin/../lib/poolparty/helpers/../../../bin/../lib/../vendor/gems/suitcase/lib/suitcase/zipper.rb:79:in `each' | |
from /Users/nmurray/Programming/Ruby/poolparty/bin/../lib/poolparty/helpers/../../../bin/../lib/../vendor/gems/suitcase/lib/suitcase/zipper.rb:79:in `gems' | |
from /Users/nmurray/Programming/Ruby/poolparty/bin/../lib/poolparty/helpers/../../../bin/../lib/poolparty/provision/boot_strapper.rb:93:in `pack_the_dependencies' | |
from /Users/nmurray/Programming/Ruby/poolparty/bin/../lib/poolparty/helpers/../../../bin/../lib/ |
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
// bookmarklet to click delicious recommended tags | |
javascript:var%20tags%20=%20[];%20var%20result%20=%20document.evaluate("//li[@id=\"save-reco-tags\"]//a/text()%20|%20//li[@id=\"save-pop-tags\"]//a/text()",%20document,%20null,%20XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,%20null);%20for%20(var%20i%20=%200;%20i%20<%20result.snapshotLength;%20i++)%20{%20thisLink%20=%20result.snapshotItem(i);%20tags.push(thisLink.nodeValue);%20}%20document.getElementById('tags').value%20+=%20tags.join('%20'); |
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
apache do | |
installed_as_standard | |
enable_php5 do | |
extras :cli, :pspell, :mysql | |
end | |
config("store", ::File.join(File.dirname(__FILE__), "templates/apache", "store.conf.erb")) | |
has_custom_store do |
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 | |
require 'git-style-binary/command' | |
GitStyleBinary.command do | |
short_desc "create a blog post" | |
banner <<-EOS | |
Usage: #{command.full_name} #{all_options_string} {content|STDIN} | |
Posts content to a wordpress blog |
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
" Vim Markdown preview | |
" | |
" * compile vim with ruby support | |
" * sudo gem install rdiscount (update load path to absolute path below) | |
" * add this file to | |
" ~/.vim/ftplugin/mkd.vim | |
function! PreviewMKD() | |
ruby << EOF | |
require 'rubygems' | |
$:.unshift("/usr/local/lib/ruby/gems/1.8/gems/rdiscount-1.3.4/lib") |
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
def require_chef_recipe | |
unless @required_chef_recipe | |
include_chef_recipe "god" # requires opscode chef recipes | |
@required_chef_recipe = true | |
end | |
end | |
# wish it could be | |
def require_chef_recipe | |
do_once do |
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 -rubygems | |
require 'git-style-binary/command' | |
require 'dnssd' | |
require 'set' | |
TestService = Struct.new(:name, :host, :port, :description) unless defined?(TestService) | |
TcpType = "_dnssdtest._tcp" unless defined?(TcpType) | |
GitStyleBinary.primary do | |
version "dnssd-test" |
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 | |
# | |
# cli tool for twitter that will help you count the number of characters in your tweet | |
# | |
require 'rubygems' | |
require 'thread' | |
begin | |
require 'twitter' | |
rescue LoadError => e |
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
module B | |
def whisper(a) | |
puts a.downcase | |
end | |
end | |
class Class | |
include B | |
def say(a) | |
puts a |