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
*** Exception SecurityError in spawn manager (Insecure operation - directory?) (process 745): | |
from /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.6/lib/passenger/application.rb:45:in `directory?' | |
from /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.6/lib/passenger/application.rb:45:in `detect_framework_version' | |
from /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.6/lib/passenger/spawn_manager.rb:193:in `spawn_rails_application' | |
from /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.6/lib/passenger/spawn_manager.rb:126:in `spawn_application' | |
from /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.6/lib/passenger/spawn_manager.rb:251:in `handle_spawn_application' | |
from /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.6/lib/passenger/abstract_server.rb:317:in `__send__' | |
from /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.6/lib/passenger/abstract_server.rb:317:in `main_loop' | |
from /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.6/lib/passenger/abstract_server.rb:168:in `start_synchronously' | |
from /opt/ |
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
property dueTag : "due" | |
property startTag : "start" | |
property repeatTag : "repeat" | |
property todayTag : "today" | |
property pastDueTag : "overdue" | |
property upcomingTag : "upcoming" | |
property doneTag : "done" | |
property inProgressTag : "inprogress" | |
property errorTag : "error" | |
property removeTags : {upcomingTag, todayTag, pastDueTag, inProgressTag} |
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 | |