This file contains 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
set :application, 'foo' | |
set :repository, '_site' | |
set :scm, :none | |
set :deploy_via, :copy | |
set :copy_compression, :gzip | |
set :use_sudo, false | |
set :host, '127.0.0.1' | |
role :web, host | |
role :app, host |
This file contains 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 bash | |
sudo mysqladmin shutdown | |
sudo rm /usr/local/mysql | |
sudo rm -rf /usr/local/mysql* | |
sudo rm -rf /Library/StartupItems/MySQLCOM | |
sudo rm -rf /Library/PreferencePanes/My* | |
sed '/MYSQLCOM=-YES/ d' /etc/hostconfig |
This file contains 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
(function ($) { | |
$.event.special.textchange = { | |
setup: function (data, namespaces) { | |
$(this).bind('keyup', $.event.special.textchange.handler); | |
$(this).bind('cut paste input', $.event.special.textchange.delayedHandler); | |
}, | |
teardown: function (namespaces) { |
This file contains 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
(my_key: value, another_key: value) | |
({:my_key => value, :another_key => value}) |
This file contains 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 | |
# encoding: utf-8 | |
require 'bson' | |
20.times do | |
puts BSON::ObjectId.new | |
end |
This file contains 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 "bundler/capistrano" | |
load 'deploy/assets' | |
# Rake helper task. | |
# http://pastie.org/255489 | |
# http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/ | |
# http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/ | |
def run_remote_rake(rake_cmd) | |
rake_args = ENV['RAKE_ARGS'].to_s.split(',') | |
cmd = "cd #{fetch(:latest_release)} && #{fetch(:rake, "rake")} RAILS_ENV=#{fetch(:rails_env, "production")} #{rake_cmd}" |
This file contains 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
python -m SimpleHTTPServer 8888 |
This file contains 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
#!/bin/sh | |
# W | |
# R RW W. | |
# RW::::RW DR::R | |
# :RRRRRWWWWRt:::::::RRR::::::E jR | |
# R.::::::::::::::::::::::::::Ri jiR:::R | |
# R:::::::.RERRRRWWRERR,::::::Efi:::::::R GjRRR Rj | |
# R::::::.R R:::::::::::::;G RRj WWR RjRRRRj | |
# Rt::::WR RRWR R::::::::::::::::fWR::R; WRW RW R | |
# WWWWRR:::EWR E::W WRRW:::EWRRR::::::::: RRED WR RRW RR |
This file contains 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
#!/bin/sh | |
# | |
# Install Simple Server by running this command: | |
# curl https://raw.github.com/gist/1930743/c5b9b6d6579701e2c376f84d5073d8367001bc9e/install.rb | sh | |
# | |
# Set up the environment. Respect $VERSION if it's set. | |
set -e | |
SS_ROOT="$HOME/Library/Application Support/Simple Server" |
This file contains 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 'webrick' | |
root = File.absolute_path(".") | |
server = WEBrick::HTTPServer.new :Port => 8000, :DocumentRoot => root | |
# catch int and shutdown | |
trap 'INT' do server.shutdown end |