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
| ENV["RAILS_ENV"] = "test" | |
| require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') | |
| require 'shoulda' | |
| require 'webrat' | |
| require 'factory_girl' | |
| require 'test/factories/clearance' | |
| require 'clearance/../../shoulda_macros/clearance' | |
| require 'cucumber/rails/world' | |
| Cucumber::Rails.use_transactional_fixtures | |
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
| njero - http://neverlet.be | |
| sutto - http://blog.ninjahideout.com | |
| zapnap - http://blog.zerosum.org | |
| tpope - http://tpope.net | |
| reinh - http://reinh.com | |
| bryanl - http://smartic.us | |
| linoj - http://www.vaporbase.com | |
| technicalpickles - http://technicalpickles.com | |
| MaD15 - enlightsolutions.com/ | |
| qrush - http://litanyagainstfear.com/ |
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
| site = ARGV[0] | |
| raise "Fail." if site.nil? || site == "" | |
| `staticmatic setup #{site}` | |
| Dir.chdir(site) | |
| `wget http://960.gs/files/960_download.zip` | |
| `unzip 960_download.zip` | |
| `rm 960_download.zip` | |
| `mv 960_download/code/css/*.css site/stylesheets` | |
| `rm -rf 960_download` |
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
| # Scans your project for CSS and JS files and | |
| # runs them through the Yahoo Compression utility | |
| # and then uploads the entire site to your web server via SCP. | |
| # Install prerequisites: | |
| # sudo gem install net-scp | |
| # Download http://www.julienlecomte.net/yuicompressor/ | |
| # Create a bin/ folder and place the following files from the download into the folder: |
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
| def belongs_to(association_id, options = {}) | |
| association_column = options[:foreign_key] ||= association_id.to_s + "_id" # | |
| reflection = create_belongs_to_reflection(association_id, options) | |
| if reflection.options[:polymorphic] | |
| association_accessor_methods(reflection, BelongsToPolymorphicAssociation) | |
| else | |
| association_accessor_methods(reflection, BelongsToAssociation) | |
| association_constructor_method(:build, reflection, BelongsToAssociation) | |
| association_constructor_method(:create, reflection, BelongsToAssociation) |
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 Person | |
| def say_hello | |
| "Hello" | |
| end | |
| end | |
| class Person | |
| def say_goodbye | |
| "goodbye" | |
| 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
| # Main sinatra app | |
| require 'sinatra' | |
| require 'activerecord' | |
| require 'activesupport' | |
| include ActionView::Helpers::DateHelper # add the required helpers here. | |
| require 'controllers.rb' | |
| # controllers.rb |
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
| if has('win32') || has ('win64') | |
| let $VIMHOME = $HOME."/Dropbox/dotfiles/.vim" | |
| if !empty($CONEMUBUILD) | |
| set term=xterm | |
| set t_Co=256 | |
| let &t_AB="\e[48;5;%dm" | |
| let &t_AF="\e[38;5;%dm" | |
| endif |
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
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| gems = Gem.source_index.search(Gem::Dependency.new(//, Gem::Requirement.default)) | |
| gems.each do |gem| | |
| puts "gem '#{gem.name}', '#{gem.version.to_s}'" | |
| 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
| set nocompatible "don't need to keep compatibility with Vi | |
| filetype plugin indent on " enable detection, plugins and indenting in one step | |
| syntax on "Turn on syntax highlighting | |
| set background=dark "make vim use colors that look good on a dark background | |
| set showcmd "show incomplete cmds down the bottom | |
| set showmode "show current mode down the bottom |
OlderNewer