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
# HTML 5 Boiler Plate | |
apply 'https://gist.github.com/806066.txt' | |
run "rm public/javascripts/jquery.js" | |
run "rm -rf public/build" | |
run "rm -rf public/demo" | |
run "rm -rf public/test" | |
# JQuery | |
apply 'https://gist.github.com/806025.txt' |
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
# Rails 3 simple template | |
# USE ONLY ON EMPTY APPS - USAGE:rails new app_name -m rails3-templates/base.rb | |
# Remove Default | |
run 'mv public/index.html public/test-rails3.html' | |
# Install JQuery | |
inside "public/javascripts" do | |
FileUtils.rm_rf %w(controls.js dragdrop.js effects.js prototype.js rails.js) | |
run "wget https://github.com/rails/jquery-ujs/raw/master/src/rails.js --no-check-certificate" |
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
# Delete old prototype drivers | |
# Do this first so that you don't delete the new jQuery rails one below | |
inside('public/javascripts') do | |
FileUtils.rm_rf %w(controls.js dragdrop.js effects.js prototype.js rails.js) | |
end | |
# Download latest jQuery.min | |
get "http://code.jquery.com/jquery-latest.min.js", "public/javascripts/jquery.js" | |
# Download latest jQuery drivers |
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 NOCOUNT ON | |
DECLARE @stringToFind VARCHAR(100) | |
DECLARE @stringToReplace VARCHAR(100) | |
DECLARE @schema sysname | |
DECLARE @table sysname | |
DECLARE @count INT | |
DECLARE @sqlCommand VARCHAR(8000) | |
DECLARE @where VARCHAR(8000) | |
DECLARE @columnName sysname |
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
desc 'After_deploy callback' | |
task :before_deploy => :environment do |t, args| | |
username = `git config codebase.username`.chomp.strip | |
api_key = `git config codebase.apikey`.chomp.strip | |
if username == '' || api_key == '' | |
puts " * Codebase is not configured on your computer. Bundle the codebase gem and run 'codebase setup' to auto configure it." | |
puts " * Deployments will not be tracked." | |
next |
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
require 'test_helper' | |
require 'admin/comments_controller' | |
class Admin::CommentsController; def rescue_iction(e) raise e end; end | |
class CommentControllerTest < ActionController::TestCase | |
should "get index" do | |
Factory(:comment) | |
Factory(:comment) |
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 --trace install ree | |
--trace install ree | |
rvm 0.1.38 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/] | |
+ [[ -z '' ]] | |
+ [[ ! -z ree ]] | |
+ rvm_action=use | |
+ [[ ! -z '' ]] | |
+ [[ ! -z '' ]] |
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
SELECT * FROM sometable WHERE textfield LIKE '%value%'; |
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
SELECT * FROM sometable WHERE textfield ILIKE '%value%'; |
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
<%= some_string.html_safe %> |