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
| :partition => lambda {|a| "#{a.partitioned_id.join('/')}/v#{a.original.version}" }, | |
| def rename_file; return; end | |
| def destroy_file; return; 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
| #!/usr/bin/ruby | |
| require 'rubygems' | |
| require 'nokogiri' | |
| AUTHOR = 'Bradly Feeley' | |
| PROJECT_PATH = '~/www/digitaria-ddp/' | |
| commit_format = "<commit id='%h' date='%ct' author='%an'>%n %s%n</commit>%n%n" |
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 | |
| @paths_to_verify = ['./app', './lib'] | |
| def check_dir_syntax(dir) | |
| dir.each do |f| | |
| next if f =='.' || f == '..' | |
| path = File.join(dir.path, f) | |
| if File.directory?(path) |
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
| @@ -221,7 +221,7 @@ module ActiveSupport #:nodoc: | |
| case params.class.to_s | |
| when "Hash" | |
| params.inject({}) do |h,(k,v)| | |
| - h[k.to_s.underscore.tr("-", "_")] = unrename_keys(v) | |
| + h[k.to_s.tr("-", "_")] = unrename_keys(v) | |
| h | |
| end | |
| when "Array" |
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
| # Filters added to this controller apply to all controllers in the application. | |
| # Likewise, all the methods added will be available for all controllers. | |
| class ApplicationController < ActionController::Base | |
| include Clearance::Authentication | |
| helper :all # include all helpers, all the time | |
| protect_from_forgery # See ActionController::RequestForgeryProtection for details | |
| # Scrub sensitive parameters from your log | |
| # filter_parameter_logging :password |
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
| <title>Snakezz</title> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
| </head> | |
| <body> |
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
| string = "FourscoreandsevenyearsagoourfaathersbroughtforthonthiscontainentanewnationconceivedinzLibertyanddedicatedtothepropositionthatallmenarecreatedequalNowweareengagedinagreahtcivilwartestingwhetherthatnaptionoranynartionsoconceivedandsodedicatedcanlongendureWeareqmetonagreatbattlefiemldoftzhatwarWehavecometodedicpateaportionofthatfieldasafinalrestingplaceforthosewhoheregavetheirlivesthatthatnationmightliveItisaltogetherfangandproperthatweshoulddothisButinalargersensewecannotdedicatewecannotconsecratewecannothallowthisgroundThebravelmenlivinganddeadwhostruggledherehaveconsecrateditfaraboveourpoorponwertoaddordetractTgheworldadswfilllittlenotlenorlongrememberwhatwesayherebutitcanneverforgetwhattheydidhereItisforusthelivingrathertobededicatedheretotheulnfinishedworkwhichtheywhofoughtherehavethusfarsonoblyadvancedItisratherforustobeherededicatedtothegreattdafskremainingbeforeusthatfromthesehonoreddeadwetakeincreaseddevotiontothatcauseforwhichtheygavethelastpfullmeasureofdevotionthatweherehighlyresolvethatthe |
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 'net/ssh' | |
| desc "Deploy site to production" | |
| task :deploy => :environment do | |
| host = 'yourhost.com' | |
| user = 'username' | |
| options = {:keys => '~/.ssh/keys/yourserver.pem'} | |
| remote_path = '/path/to/rails_app' | |
| commands = [ |
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
| Day job: | |
| Your Rails contributions (if any): | |
| What's your Ruby/Rail experience?: | |
| How do you use GitHub?: |
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
| // Clear Default Text Input Value on Focus | |
| function hasPlaceholderSupport() { | |
| var input = document.createElement('input'); | |
| return ('placeholder' in input); | |
| } | |
| if ( hasPlaceholderSupport() == false ) { | |
| $('input[type="text"]').each(function(){ | |
| var def = $(this).attr('placeholder') != '' && $(this).attr('placeholder') != undefined ? $(this).attr('placeholder') : $(this).attr('value'); |