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
| # Often times we need to send emails on a delayed basis. We could make this really easy on the client | |
| # side by automatically mounting an endpoint with rack middleware, and firing the mailer with the | |
| # arguments supplied. | |
| # | |
| # Under the hood, this would use the same architecture as an abstract job, where a webhook is hit | |
| # at the specified time, but by focusing on the email / action mailer use case the client doesn't need | |
| # to write any boilerplate code. | |
| Tick::EmailJob.create!( | |
| :at => appointment.start_time - 1.hour, | |
| :message => "Don't forget, your appointment starts in 1 hour!", |
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 'json' | |
| app_name = 'APP_NAME' | |
| opsworks_app_id = 'APPID' | |
| config = `heroku config -s --app #{app_name}`.strip | |
| json = [] |
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
| diff --git a/app/models/model.rb b/app/models/model.rb | |
| new file mode 100644 | |
| index 0000000..14c4620 | |
| --- /dev/null | |
| +++ b/app/models/model.rb | |
| @@ -0,0 +1,2 @@ | |
| +class Model < Sequel::Model | |
| +end | |
| \ No newline at end of file | |
| diff --git a/config/application.rb b/config/application.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
| require 'spec/runner/formatter/progress_bar_formatter' | |
| class NescafeFormatter < Spec::Runner::Formatter::ProgressBarFormatter | |
| def example_failed(example, counter, failure) | |
| super | |
| dump_failure(counter, failure) | |
| end | |
| 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/env ruby | |
| begin | |
| require 'rev' | |
| rescue LoadError | |
| puts "############## WARNING!!! ##############" | |
| puts "You do not have the rev gem installed.\nIt is highly recommended to install this." | |
| puts "The rev gem uses filesystem events rather than cpu polling to see if files have changed." | |
| puts "\n" | |
| puts "Please run `gem install rev` to install" |
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 'rubygems' | |
| ['wirble-0.1.3', 'awesome_print-0.2.1'].each do |g| | |
| $:.unshift("/usr/local/lib/ruby/gems/1.8/gems/#{g}/lib") | |
| end | |
| require 'ap' | |
| require 'wirble' | |
| Wirble.init | |
| Wirble.colorize |
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
| // NOTE: You need dotjs installed to use this: https://github.com/defunkt/dotjs | |
| // | |
| // You must name this file with your airbrakeapp subdomain prepended to the filename. | |
| // Example: So myairbrakesubdomain.airbrakeapp.com.js | |
| var login = "<GITHUB USERNAME>"; | |
| var token = "<GITHUB TOKEN>"; | |
| var title = $("#notice_heading h2").text(); | |
| var link = document.location.href; |
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
| // Adds a live filter box to the results screen on craigslist | |
| // that filters the results that are currently on the page by | |
| // the search term. Like Cmd-F, but better. | |
| // NOTE: Requires dotjs. | |
| // Cmd-F live search | |
| var searchBox = $('<input type="text" id="result-search" />') | |
| $("h4.ban:first").before(searchBox) |
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
| import balanced | |
| import random | |
| balanced.configure('7b7a51ccb10c11e19c0a026ba7e239a9') # test marketplace | |
| business = { | |
| 'type': 'business', | |
| 'name': 'Bobs Used Auto Emporium', |
OlderNewer