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
language: ruby | |
rvm: | |
- 2.1.0 | |
before_script: | |
- "sh -e /etc/init.d/xvfb start" | |
- "export DISPLAY=:99.0" | |
- "export JASMINE_SPEC_FORMAT=documentation" | |
env: | |
- PG_USERNAME='postgres' | |
script: |
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
// Underscore.js 1.6.0 | |
// http://underscorejs.org | |
// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | |
// Underscore may be freely distributed under the MIT license. | |
(function() { | |
// Baseline setup | |
// -------------- |
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
// Backbone.js 1.1.2 | |
// (c) 2010-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | |
// Backbone may be freely distributed under the MIT license. | |
// For all details and documentation: | |
// http://backbonejs.org | |
(function(root, factory) { | |
// Set up Backbone appropriately for the environment. Start with AMD. |
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
<script src="//http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script> | |
<script src="//http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<script src="//http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js"></script> |
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
Backbone.Collection = { | |
fetch: function() { | |
var requestUrl; | |
if (isAFunction(this.url)) { | |
requestUrl = this.url(); | |
} else { | |
requestUrl = this.url; | |
} | |
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
# README | |
# pass in this file when creating a rails project | |
# | |
# for example: | |
# rails _3.2.14_ new awesome_app -d postgresql -m ~/kickhash_template.rb | |
remove_file "README.rdoc" | |
create_file "README.md", "TODO" | |
gem_group :development, :test do |
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
$(document).ready(function() { | |
$(".view-trips").click(function(event) { | |
event.preventDefault(); | |
$.ajax({ | |
url: "/trips/users/" + userId, | |
method: "GET", | |
dataType: "json" | |
}).done(function(data) { | |
$(".trips").empty() | |
$("<h3>").appendTo(".trips") |
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
def search | |
result = HTTParty.get("https://api.twitter.com/1.1/search/tweets.json", | |
:query => { 'q' => self.name }, | |
:headers => { | |
'Authorization' => "Bearer #{ENV['TWIT']}" | |
}) | |
result_body = result.body | |
json_result_body = JSON.parse(result_body) | |
statuses = json_result_body["statuses"] | |
texts = statuses.map { |status| status["text"]} |
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
def self.fetch | |
# fetch data from NYC openscrape | |
responses = HTTParty.get('http://nypd.openscrape.com/data/collisions.json.gz') | |
# limit the reponses to approx 700 | |
limit_resp = responses[37000..-1] | |
# responses.map do |response| | |
limit_resp.map do |response| | |
traffic_incident = self.new(latitude: response[0], longitude: response[1], description: description(response)) |
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
gem 'newrelic_rpm' | |
gem 'devise', '~> 2.2.4' | |
gem 'stripe' | |
gem "paperclip", "~> 3.5.0" | |
gem "httparty" | |
gem 'unicorn' | |
gem 'mail' | |
gem 'redis' | |
gem 'resque', '~> 1.25.2', :require => 'resque/server' | |
gem 'resque-scheduler' |