This file contains 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 ApplicationController < ActionController::Base | |
before_filter do | |
if (Subdomain) | |
@site = Site.find_by_name!(request.subdomain) | |
end | |
end | |
end |
This file contains 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 | |
file = STDIN.read[/sass: ([^*]+\.scss)/, 1] || ENV["TM_FILEPATH"] | |
file2 = file.sub(/\.scss/,'.css') | |
system("sass \"#{file}\":\"#{file2}\"") |
This file contains 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
# Returns representation of the data of the file assigned to the given | |
# style, in the format most representative of the current storage. | |
def to_file style = default_style | |
return @queued_for_write[style] if @queued_for_write[style] | |
filename = path(style) | |
extname = File.extname(filename) | |
basename = File.basename(filename, extname) | |
file = Tempfile.new([basename, extname]) | |
file.binmode # Added | |
file.write(AWS::S3::S3Object.value(path(style), bucket_name)) |
This file contains 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 ApplicationController < ActionController::Base | |
protect_from_forgery | |
before_filter :mailer_set_url_options | |
def mailer_set_url_options | |
ActionMailer::Base.default_url_options[:host] = request.host_with_port | |
end | |
end |
This file contains 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
ruby-1.9.2-p180-patched :010 > s = Style.create!(:name => "Awesometown", :family => 'Yay beer', :code => '8D') | |
ActiveRecord::RecordInvalid: Validation failed: Name can't be blank, Family can't be blank, Code can't be blank | |
from /Users/seangaffney/.rvm/gems/ruby-1.9.2-p180-patched/gems/activerecord-3.0.9/lib/active_record/validations.rb:49:in `save!' | |
from /Users/seangaffney/.rvm/gems/ruby-1.9.2-p180-patched/gems/activerecord-3.0.9/lib/active_record/attribute_methods/dirty.rb:30:in `save!' | |
from /Users/seangaffney/.rvm/gems/ruby-1.9.2-p180-patched/gems/activerecord-3.0.9/lib/active_record/transactions.rb:245:in `block in save!' | |
from /Users/seangaffney/.rvm/gems/ruby-1.9.2-p180-patched/gems/activerecord-3.0.9/lib/active_record/transactions.rb:292:in `block in with_transaction_returning_status' | |
from /Users/seangaffney/.rvm/gems/ruby-1.9.2-p180-patched/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction' | |
from /Users/seangaffney/.rvm/gems/ruby-1.9.2 |
This file contains 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
alias lls='ls -lha' | |
alias ~='cd ~' | |
alias reload="source ~/.bash_profile" | |
alias pyserver="python -m SimpleHTTPServer" | |
# Projects | |
alias cdb1="cd ~/Sites/blah1" | |
alias cdb2="cd ~/Sites/blah2" |
This file contains 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
jQuery.each($($0).data("events").click, function(key, handlerObj) { console.log(handlerObj.handler) }); |
This file contains 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
/* | |
* jQuery sgFixThatIsh v0.1 :) | |
* http://seangaffney.cc | |
* Copyright 2012, Sean Gaffney | |
*/ | |
(function( $ ){ | |
var opts = { bottomPadding: 8 }; | |
var $header, $content, $win; | |
var contWidth, currentContWidth, headHeight, headWidth, |
This file contains 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
¢‿¢ | |
©¿© o | |
ª{•̃̾_•̃̾}ª | |
¬_¬ | |
¯\(º_o)/¯ | |
¯\(º o)/¯ | |
¯\_(⊙︿⊙)_/¯ | |
¯\_(ツ)_/¯ | |
°ω° | |
°Д° |
This file contains 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
DummyCourse = Struct.new(:title) do | |
def description | |
"Courses have been discontinued. This course contains all syllabi." | |
end | |
def published_for_ios | |
true | |
end |
OlderNewer