This file contains hidden or 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
# Reset | |
Color_Off='\e[0m' # Text Reset | |
# Regular Colors | |
Black='\e[0;30m' # Black | |
Red='\e[0;31m' # Red | |
Green='\e[0;32m' # Green | |
Yellow='\e[0;33m' # Yellow | |
Blue='\e[0;34m' # Blue | |
Purple='\e[0;35m' # Purple |
This file contains hidden or 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
export HISTCONTROL=ignoredups | |
export INPUTRC="~/.inputrc" | |
export EDITOR='open -a /Applications/MacVim.app -f' | |
shopt -s checkwinsize | |
shopt -s cdspell | |
shopt -s histappend | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxCxDxBxegedabagacad |
This file contains hidden or 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 | |
# Make the structure | |
mkdir -p public/assets/javascripts | |
mkdir -p public/assets/stylesheets | |
mkdir -p public/assets/images | |
# Images - handle these first so that the resulting md5 hashed names can be inserted |
This file contains hidden or 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
" Functions | |
function! <SID>StripTrailingWhitespaces() | |
" Preparation: save last search, and cursor position. | |
let _s=@/ | |
let l = line(".") | |
let c = col(".") | |
" Do the business: | |
%s/\s\+$//e | |
" Clean up: restore previous search history, and cursor position | |
let @/=_s |
This file contains hidden or 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 Growl | |
def notify_with_say(message = nil, options = {}, &block) | |
message = message.gsub(/in\s*[0-9\.]+\s*seconds$/, '') | |
`say -v Virginie "#{message}"` | |
return | |
end | |
alias_method_chain :notify, :say | |
module_function :notify |
This file contains hidden or 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 Center < ActiveRecord::Base | |
belongs_to :thing | |
validates :thing_id, :presence => true | |
end |
This file contains hidden or 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
#---------------------------------------------------------------------- | |
# Vagrant quirks | |
#---------------------------------------------------------------------- | |
# Vagrant has Ruby in /opt/ruby/bin, but it is not available to `sudo` | |
# by default. We need to do some sed-fu here in order to enable that. | |
# This better mimicks production. Ideally, however, we would have a base | |
# box that exactly mimics production. | |
if node[:environment] == "development" | |
node[:sudo][:options] << "!secure_path" | |
end |
This file contains hidden or 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
*snip* | |
# The config file format is like | |
# | |
# dropbox: | |
# app_key: YOUR_APP_KEY | |
# app_secret: YOUR_APP_SECRET | |
# storage: | |
# provider: AWS | |
# aws_access_key_id: YOUR_ACCESS_KEY |
This file contains hidden or 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
# http://unicorn.bogomips.org/SIGNALS.html | |
God.watch do |w| | |
w.name = "unicorn" | |
w.interval = 30.seconds # default | |
# unicorn needs to be run from the rails root | |
w.start = "cd #{RAILS_ROOT} && #{BIN_PATH}/unicorn_rails -c #{RAILS_ROOT}/config/unicorn.rb -E #{RAILS_ENV} -D" | |
# QUIT gracefully shuts down workers |
This file contains hidden or 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 AbortableMailer | |
class UndeliverableMailMessage < Mail::Message | |
def self.deliver | |
false | |
end | |
def self.deliver! | |
false | |
end | |
end |