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
No tests matched config/initializers/load_app_config.rb | |
No tests matched spec/controllers/sessions_controller_spec.rb | |
No tests matched spec/helpers/sessions_helper_spec.rb | |
No tests matched spec/models/comment_spec.rb | |
No tests matched spec/spec_helper.rb | |
No tests matched config/app_config.yml | |
No tests matched config/initializers/new_rails_defaults.rb | |
No tests matched lib/tasks/rspec.rake | |
No tests matched config/locales/en.yml | |
No tests matched spec/fixtures/comments.yml |
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
## app/helpers/movies_helper.rb | |
module MoviesHelper | |
link_to_movie(movie) | |
case movie.type | |
when 'internal': internal_movie_link(movie) | |
when 'external': external_movie_link(movie) | |
else normal_movie_link(movie) | |
end | |
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
(* | |
A basic script for managing due dates. | |
*) | |
property dueTag : "due" | |
property repeatTag : "repeat" | |
property todayTag : "today" | |
property overdueTag : "overdue" | |
property upcomingTag : "upcoming" | |
property doneTag : "done" |
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
<theme> | |
<!-- For That Matter Theme for TaskPaper | |
by Andy Ferra (andyferra.com) | |
based on Dark Matter Theme --> | |
<!-- Colors --> | |
<color id="tag" red="0.1" green="0.1" blue="0.1" alpha="1.0" /> | |
<color id="handle" red="0.25" green="0.25" blue="0.25" alpha="1.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
## example.rb | |
class Example | |
include Enumerable | |
@wrapped_array = ['something', 'foof'] | |
end | |
e = Example.new |
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
## ~/git-ps1.rb | |
green = "\033[0;32m" | |
red = "\033[0;31m" | |
base = "\033[0;37m" # <-- Needs to be set to whatever your shell base colors is | |
current_branch = `git branch 2>/dev/null`.grep(/^\*/).first | |
if current_branch | |
branch_name = current_branch.gsub(/^\*\s*/,'').strip | |
color = branch_name =~ /master/ ? green : red |
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
tell application "GrowlHelperApp" | |
-- Make a list of all the notification types | |
-- that this script will ever send: | |
set the allNotificationsList to ¬ | |
{"Test Notification", "Another Test Notification"} | |
-- Make a list of the notifications | |
-- that will be enabled by default. | |
-- Those not enabled by default can be enabled later | |
-- in the 'Applications' tab of the growl prefpane. |
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
class AddIndexesToUsers < ActiveRecord::Migration | |
def self.up | |
add_index :users, [:email, :account_id], :unique => true | |
end | |
def self.down | |
remove_index :users, :column => [:email, :account_id] | |
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
class AddIndexesToAccounts < ActiveRecord::Migration | |
def self.up | |
add_index :accounts, :domain_name, :unique => true | |
end | |
def self.down | |
remove_index :accounts, :column => :domain_name | |
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
$ cap deploy | |
* executing `deploy' | |
* executing `deploy:update' | |
** transaction: start | |
* executing `deploy:update_code' | |
executing locally: "git ls-remote git@github.com:andyferra/piggyback-savings.git master" | |
* executing "git clone -q git@github.com:andyferra/piggyback-savings.git /var/www/apps/piggybacksavings.com/releases/20090305184815 && cd /var/www/apps/piggybacksavings.com/releases/20090305184815 && git checkout -q -b deploy 0f8c9391ccf3c9630e7115df965152ac54a2291f && (echo 0f8c9391ccf3c9630e7115df965152ac54a2291f > /var/www/apps/piggybacksavings.com/releases/20090305184815/REVISION)" | |
servers: ["209.20.75.75"] | |
[209.20.75.75] executing command | |
** [209.20.75.75 :: out] Permission denied (publickey). |