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
# Rails template for initializing new projects | |
# Initialize git repository | |
git :init | |
# Delete unnecessary files | |
run "rm README" | |
run "rm public/index.html" | |
run "rm public/favicon.ico" | |
run "rm public/robots.txt" |
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 :user, "dbloete" | |
set :domain, "the.domain.com" | |
set :application, "myapp" | |
set :deploy_to, "/var/www/#{application}" | |
set :repository, "[email protected]:#{user}/#{application}.git" | |
namespace :vlad do | |
desc "Symlinks the configuration files" | |
remote_task :symlink_config, :roles => :web do | |
%w(application.yml database.yml).each do |file| |
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 'net/http' | |
require 'uri' | |
# /api/v1/:format/new | |
# /api/v1/:format/gists/:user | |
# /api/v1/:format/:gist_id | |
res = Net::HTTP.post_form(URI.parse('http://gist.github.com/api/v1/xml/new'), | |
{ 'files[file1.ab]' => 'CONTNETS', | |
'files[file2.ab]' => 'contents' }) |
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/bash | |
# This script will update your cappuccino installation with the | |
# current version of the provided branch (defaults to "master") | |
cd /usr/local/src/cappuccino/ | |
branch=${1-"master"} | |
# update sources | |
git checkout -f -b $branch origin/$branch | |
git pull |
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
# poor mans debugger | |
# | |
# if you want to know whats the value of an object just add .why? | |
# and you will see what it is and why your program behaves like it does. | |
# | |
Object.class_eval {def why?; raise "Because it is #{inspect}" ; 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
html, body, div, form, fieldset, legend, label { | |
margin: 0; | |
padding: 0; | |
} | |
table { | |
border-collapse: collapse; | |
border-spacing: 0; | |
} |
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
From 22f184268e27474faf93b2d06893f42593b084e1 Mon Sep 17 00:00:00 2001 | |
From: dbloete <[email protected]> | |
Date: Tue, 25 May 2010 22:07:35 +0200 | |
Subject: [PATCH] Fix compass/sass deprecation warnings | |
--- | |
Rakefile | 2 +- | |
stylesheets/_base.sass | 2 +- | |
stylesheets/_layout.sass | 2 +- | |
stylesheets/_library.sass | 12 +++--- |
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
# rubygems DNS is temporarily down, put this into your /etc/hosts to install gems, | |
# but don't forget to remove the entries once their DNS is back up again | |
72.4.120.124 rubygems.org | |
207.171.181.231 production.s3.rubygems.org | |
216.137.45.24 production.cf.rubygems.org |
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
module AuthenticationHelpers | |
def current_user_session | |
return @current_user_session if defined?(@current_user_session) | |
@current_user_session = UserSession.find | |
end | |
def current_user | |
return @current_user if defined?(@current_user) | |
@current_user = current_user_session && current_user_session.user |
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/bash | |
if [ $# -ne 1 ]; then PATHDIR=`pwd`; else PATHDIR=~/Sites/"$1"; fi | |
/usr/bin/osascript <<EOF | |
set actions to {"./script/server", "bundle exec spork rspec", "bundle exec autospec", "git pull --rebase && mate ."} | |
on new_tab() | |
tell application "System Events" to tell process "Terminal" \ | |
to keystroke "t" using command down |
OlderNewer