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
COMP_NAME="OS X Workstation:" | |
PS1='\n*======================================================================================*\n\[\033[0;34m\] $COMP_NAME \u@\h \d \t \W$(__git_ps1 "(%s)")\[\033[0m\]\n----------------------------------------------------------------------------------------\n\[\033[0;34m\]\w\[\033[0m\] >' |
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
$gem environment | |
RubyGems Environment: | |
- RUBYGEMS VERSION: 1.3.5 | |
- RUBY VERSION: 1.8.6 (2009-08-04 patchlevel 383) [i686-darwin9.7.0] | |
- INSTALLATION DIRECTORY: /Users/jspillers/.rvm/gems/ruby/1.8.6 | |
- RUBY EXECUTABLE: /Users/jspillers/.rvm/ruby-1.8.6-p383/bin/ruby | |
- EXECUTABLE DIRECTORY: /Users/jspillers/.rvm/gems/ruby/1.8.6/bin | |
- RUBYGEMS PLATFORMS: | |
- ruby | |
- x86-darwin-9 |
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
RubyGems Environment: | |
- RUBYGEMS VERSION: 1.3.3 | |
- RUBY VERSION: 1.8.6 (2009-06-15 patchlevel 287) [java] | |
- INSTALLATION DIRECTORY: /Users/jspillers/.rvm/gems/jruby/1.3.1 | |
- RUBY EXECUTABLE: /Users/jspillers/.rvm/jruby-1.3.1/bin/jruby | |
- EXECUTABLE DIRECTORY: /Users/jspillers/.rvm/gems/jruby/1.3.1/bin | |
- RUBYGEMS PLATFORMS: | |
- ruby | |
- universal-java-1.5 | |
- GEM PATHS: |
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
~ >rvm use jruby | |
<w> jruby 1.3.1 is not installed. | |
<i> Installing jRuby to: /Users/jspillers/.rvm/jruby-1.3.1 | |
<i> Installing jruby-1.3.1... | |
make: *** No targets specified and no makefile found. Stop. | |
~ |
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
~/.rvm >rm -rf jruby-1.3.1/ | |
~/.rvm >cd gems/ | |
~/.rvm/gems >ll | |
total 0 | |
drwxr-xr-x 4 jspillers admin 136 Sep 9 15:50 . | |
drwxr-xr-x 13 jspillers admin 442 Sep 9 16:03 .. | |
drwxr-xr-x 3 jspillers admin 102 Sep 9 15:50 jruby | |
drwxr-xr-x 3 jspillers admin 102 Sep 9 15:23 ruby |
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
# Image Server Configuration | |
IMAGE_SERVER_APP_CODE = 'dish' | |
IMAGE_SERVER = "http://204.236.234.214" | |
BASE_ASSET_HOST = "#{IMAGE_SERVER}/#{IMAGE_SERVER_APP_CODE}" | |
# Selective External Asset Checking | |
ActionController::Base.asset_host = Proc.new { |source, request| | |
# This app server has many images versioned. Some images however live outside | |
# the scope of this application. In that case, look for them on that app server. |
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
Ipvod data is stored in provided by the rest feed we get for | |
franchises (http://mv2.sling.com/mediaview/franchise/list.xml). | |
This data is parsed from each franchise node and stored in two | |
different tables: ipvods and ipvod_prices | |
an ipvod belongs to a franchise via the franchise_id column | |
and one or more ipvod_prices belong to an ipvod via the ipvod_id column | |
Here is an example: |
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 SensoryExtension | |
def feel_sludge? | |
unless self.feel.empty? | |
self.feel.unit == RubyWarrior::Units::Sludge || self.feel.unit == RubyWarrior::Units::ThickSludge | |
end | |
end | |
def feel_archer? | |
unless self.feel.empty? | |
self.feel.unit == RubyWarrior::Units::Archer |
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
# stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb | |
# and made a lot more robust by me | |
# this implementation uses erb by default. if you want to use any other template mechanism | |
# then replace `erb` on line 13 and line 17 with `haml` or whatever | |
module Sinatra::Partials | |
def partial(template, *args) | |
template_array = template.to_s.split('/') | |
template = template_array[0..-2].join('/') + "/_#{template_array[-1]}" | |
options = args.last.is_a?(Hash) ? args.pop : {} | |
options.merge!(:layout => false) |
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
# my app had quite a few different worker classes so | |
# i decided to extend them all from one place: | |
# config/initializers/resque.rb | |
if Rails.env == "production" || Rails.env == "staging" | |
resque_klasses = [ | |
SomeJob, | |
AnotherJob, | |
VeryHardWork, | |
PrettyEasyJobHere |
OlderNewer