gem install thor
mkdir -p ~/vagrants && cd ~/vagrants
curl -LO https://raw.github.com/gist/1528832/vagrantify
chmod 755 vagrantify
./vagrantify init webserver
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -xvzf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125/ | |
./configure --prefix=/usr/local | |
make | |
make install |
$.fn.extend | |
myplugin: (options) -> | |
self = $.fn.myplugin | |
opts = $.extend {}, self.default_options, options | |
$(this).each (i, el) -> | |
self.init el, opts | |
self.log el if opts.log | |
$.extend $.fn.myplugin, | |
default_options: |
do ($ = jQuery) -> | |
$.fn.zebraTable = (options) -> | |
defaults = | |
evenColor: '#ccc' | |
oddColor : '#eee' | |
options = $.extend(defaults, options) | |
@each -> | |
$("tr:even", @).css('background-color', options.evenColor) | |
$("tr:odd", @).css('background-color', options.oddColor) |
# Example of .jrubyrc | |
# Set compilation mode. JIT = at runtime; FORCE = before execution. (JIT, FORCE, OFF, OFFIR) | |
# compile.mode = FORCE | |
# Dump to console all bytecode generated at runtime. | |
# compile.dump = true | |
# Enable verbose JIT logging (reports failed compilation) | |
# jit.logging.verbose = true |
directory "tmp" | |
file "tmp/hello.tmp" => "tmp" do | |
sh "echo 'Hello' > 'tmp/hello.tmp'" | |
end | |
task :default => 'morning:turn_off_alarm' | |
namespace :morning do | |
desc "Turn off alarm." |
/* | |
* Extends Handlebars with a basic get method for loading external | |
* Handlebars templates. Simply pass an options object which contains | |
* the following properties: | |
* - path (required) : Path to the external template file to be loaded | |
* - success (required) : Callback invoked with the compiled loaded template. | |
* - cache (optional) : true if the template is to be cached, otherwise false. | |
* | |
* In addition to the above arguments, any jQuery/Zepto.ajax options argument | |
* can be specified as well. |
// If you need a handy color picker try http://hslpicker.com | |
// Or look at octopress/sass/base/solarized.scss for inspiration. The colors in there are excellent. | |
// The following are ordered in terms of vague importance. | |
//Pick your favorite color. If you picked a thoughtful blue, try again. | |
$main-color: #6c71c4; | |
//This controls the background. | |
$page-bg: lighten($main-color,20); |
<?php | |
/* | |
* Converts CSV to JSON | |
* Example uses Google Spreadsheet CSV feed | |
* csvToArray function I think I found on php.net | |
*/ | |
header('Content-type: application/json'); | |
// Set your CSV feed |
# Cookbook Name:: mongodb | |
# Recipe:: default | |
case node['platform'] | |
when "ubuntu" | |
execute "apt-get update" do | |
action :nothing | |
end | |
execute "add gpg key" do |