Skip to content

Instantly share code, notes, and snippets.

View shayfrendt's full-sized avatar

Shay Frendt shayfrendt

View GitHub Profile
# Callbacks
before "deploy:setup", "sqlite3:config"
after "deploy:update_code", "sqlite3:symlink"
# Tasks
namespace :sqlite3 do
desc "Configure the shared path to contain a persistent sqlite3 database"
task :config do
run "mkdir -p #{shared_path}/db"
@shayfrendt
shayfrendt / install_blueprint.rake
Created March 23, 2009 01:34
A rake task to install the blueprint css framework
require 'fileutils'
namespace :blueprint do
desc "Install the Blueprint CSS framework as a plugin"
task :install do
puts "Installing the Blueprint CSS framework files."
sh %{ruby script/plugin install git://github.com/joshuaclayton/blueprint-css.git}
end
desc "Reinstall the Blueprint CSS framework as a plugin"
# Insert at the beginning of an action method to see which parameters are being passed
raise params.inspect
@shayfrendt
shayfrendt / blueprint html head tags
Created April 3, 2009 22:20
blueprint-css stylesheet link tags
<%= stylesheet_link_tag 'screen', :media => 'screen, projection' %>
<%= stylesheet_link_tag 'print', :media => 'print' %>
<!--[if IE]>
<%= stylesheet_link_tag 'ie', :media => 'screen, projection' %>
<![endif]-->
<%= stylesheet_link_tag 'base' %>
# app:sync
# Local and production synchronization
# - require yaml_db plugin
namespace :app do
namespace :sync do
task :all => [:files, :db]
task :files do
`rsync -azv user@host:'/apps/myawesomeapp/shared/files/' #{Rails.root + 'files'}`
~/rails/stopwatch[cucumber]⚡$ rake cucumber --trace
(in /Users/shayfrendt/rails/stopwatch)
** Invoke cucumber (first_time)
** Invoke cucumber:ok (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
** Execute db:test:prepare
@shayfrendt
shayfrendt / automating_remote_startup.textile
Created December 30, 2009 04:00
How to set up waking up a remote computer utilizing wake-on-lan from your local command line interface

Setup Steps

1. Enable wake-on-lan on the motherboard of the remote computer you’d like to wake up
2. Enable wake-on-lan within your router configuration for that same remote computer
3. Enable sshd within your router configuration

4. Add the following aliases to your .bash_profile, you’ll wanna have ’em later as shortcuts

alias router="ssh [email protected]"
alias wake="echo '/usr/sbin/wol -i 192.168.1.255 00:11:22:33:44:55' | pbcopy"
@shayfrendt
shayfrendt / gist:267429
Created January 2, 2010 08:58 — forked from retr0h/gist:132506
Ubuntu Chef Bootstrapper
#!/bin/sh
trap "exit 2" 1 2 3 13 15
##
# Ubuntu.
if [ -f "/etc/lsb-release" ]; then
### Supported releases.
#ISSUE="`awk '{print $2}' /etc/issue`"
ISSUE="`awk -F"[ |.]" '{print $2$3}' /etc/issue`"
#!/bin/sh
# Install ImageMagick on Snow Leopard: by kain, improved by mislav and samsoffes
# http://www.icoretech.org/2009/08/install-imagemagick-in-leopard-snow-leopard/
# Work with 64bit kernel mode
set -e
PREFIX=/usr/local
# Passenger users: amend your Apache global configuration with the following directive
# SetEnv PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
# Textmate essential bundles
cd /Applications/TextMate.app/Contents/SharedSupport/Bundles
# mkdir -p cd /Applications/TextMate.app/Contents/SharedSupport/Bundles
git clone git://github.com/protocool/ack-tmbundle.git Ack.tmbundle
git clone git://github.com/textmate/ruby-haml.tmbundle.git
git clone git://github.com/seaofclouds/sass-textmate-bundle.git "Ruby Saas.tmbundle"
git clone git://github.com/bmabey/cucumber-tmbundle.git Cucumber.tmbundle
git clone git://github.com/karnowski/blue-ridge-tmbundle.git JavaScript\ Blue\ Ridge.tmbundle
git clone git://github.com/johnmuhl/nginx-tmbundle.git nginx.tmbundle