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 Invite | |
attr_accessor :csv | |
def initialize(csv) | |
@csv = csv | |
end | |
def import! | |
# your method | |
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
>> regex = %r{^[A-Za-z]?[0-9]+$} | |
>> "11209520".match(regex) | |
=> #<MatchData "11209520"> | |
>> "A11209520".match(regex) | |
=> #<MatchData "A11209520"> | |
>> "AA11209520".match(regex) | |
=> nil |
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
/Users/seanroberts/Sites/factore/forge3/vendor/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require': no such file to load -- require_relative (LoadError) | |
from /Users/seanroberts/Sites/factore/forge3/vendor/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require' | |
from /Users/seanroberts/Sites/factore/forge3/vendor/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency' | |
from /Users/seanroberts/Sites/factore/forge3/vendor/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:in `new_constants_in' | |
from /Users/seanroberts/Sites/factore/forge3/vendor/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency' | |
from /Users/seanroberts/Sites/factore/forge3/vendor/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require' | |
from /Users/seanroberts/Sites/factore/forge3/vendor/ruby/1.8/gems/linecache-0.45/lib/linecache.rb:66 | |
from /Users/se |
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
$.ajax({ | |
url: '/forge/assets/' + id, | |
type: 'GET', | |
data: data, | |
success: function(data) { | |
// do the success stuff | |
}, | |
error: function() { alert("There was a small error, you may need to refresh the page to see your new asset."); } | |
}); |
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
# config/thingy.yml | |
development: | |
key: SLKJSDFLKJDF | |
secret: SLKDJFSLKJLKJGLKJLKJGLKJDLKJLkj21l3k432lkj | |
test: | |
key: SLKJSDFLKJDF | |
secret: SLKDJFSLKJLKJGLKJLKJGLKJDLKJLkj21l3k432lkj | |
production: | |
key: SLKJSDFLKJDF |
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
development: | |
s3: | |
key: | |
secret_key: | |
zencoder: | |
key: | |
secret_key: |
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 | |
require File.dirname(__FILE__) + '/../config/environment.rb' | |
require 'daemons' | |
class DispatchDaemonFetcherDaemon < Daemon::Base | |
@config = YAML.load_file("#{Rails.root}/config/dispatch_daemon.yml") | |
@config = @config[Rails.env].to_options | |
@sleep_time = @config.delete(:sleep_time) || 60 |
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
require 'spec_helper' | |
describe 'As a search engine viewing a page' do | |
before do | |
visit "/" | |
end | |
it "should please just run this test" do | |
1.should == 1 | |
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
task :parse_tournament_dates => :environment do | |
tournaments = Tournament.all | |
tournaments.each do |tournament| | |
dates = tournament.dates.split(' to ') | |
if dates.size == 2 | |
begin | |
tournament.starts_on, tournament.ends_on = Time.parse(dates[0]), Time.parse(dates[1]) | |
tournament.save | |
puts "Saved #{tournament.title} (#{tournament.starts_on}-#{tournament.ends_on})" | |
rescue |
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
@mixin button($background_base, $height: 39px, $left-pad: 5, $padding: 15, $background_ext: '.png') { | |
display: inline-block; | |
background: image-url('buttons/left_#{$background_base}#{$background_ext}') no-repeat left top; | |
padding-left: $left-pad + px; | |
span { | |
display: block; | |
background: image-url('buttons/right_#{$background_base}#{$background_ext}') no-repeat right top; | |
height: $height; | |
padding-left: $padding - $left-pad + px; | |
padding-right: $padding + px; |
OlderNewer