is a Rails 3.1 app running on Ruby 1.9.2 and deployed to Heroku's Cedar stack. It has an RSpec and Cucumber test suite which should be run before commiting to the master branch.
Create aliases:
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.27.1"></script> | |
| <style type="text/css"> | |
| div.tooltip { | |
| position: absolute; | |
| text-align: center; | |
| width: 60px; |
| #config/initializers/carrierwave.rb | |
| CarrierWave.configure do |config| | |
| if Rails.env.production? or Rails.env.development? | |
| config.storage :cloud_files | |
| config.cloud_files_username = "your_username" | |
| config.cloud_files_api_key = "your_key" | |
| config.cloud_files_container = "test" | |
| config.cloud_files_cdn_host = "c0012345.cdnn.cloudfiles.rackspacecloud.com" | |
| def store_dir |
| // Two ways to serve transparent GIF | |
| var buf = new Buffer([ | |
| 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, | |
| 0x80, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x2c, | |
| 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02, | |
| 0x02, 0x44, 0x01, 0x00, 0x3b]); | |
| res.send(buf, { 'Content-Type': 'image/gif' }, 200); |
| // | |
| // GIFDownloader.h | |
| // TheJoysOfCode | |
| // | |
| // Created by Bob on 29/10/12. | |
| // Copyright (c) 2012 Tall Developments. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> |
| <?xml version="1.0"?> | |
| <response> | |
| <timestamp>2012-11-21T16:18:26Z</timestamp> | |
| <resultsOffset>0</resultsOffset> | |
| <status>success</status> | |
| <resultsLimit>5</resultsLimit> | |
| <resultsCount>22</resultsCount> | |
| <headlines> | |
| <headlinesItem> | |
| <headline>Lakers edge Nets as Mike D'Antoni makes debut on L.A. bench</headline> |
| { | |
| "resultsLimit":5, | |
| "resultsOffset":0, | |
| "resultsCount":5, | |
| "listings":[ | |
| { | |
| "name":"SportsCenter", | |
| "shortName":"", | |
| "id":537483, | |
| "episodeId":"e11493518", |
| // Example JSONP request with jQuery | |
| $.ajax({ | |
| url: "http://api.espn.com/v1/sports/news/headlines", | |
| data: { | |
| // enter your developer api key here | |
| apikey: "{api key}", | |
| // the type of data you're expecting back from the api | |
| _accept: "application/json" | |
| }, | |
| dataType: "jsonp", |
| { | |
| "sports":[ | |
| { | |
| "name":"basketball", | |
| "id":40, | |
| "leagues":[ | |
| { | |
| "name":"NCAA Basketball", | |
| "abbreviation":"mens-college-basketball", | |
| "id":41, |
| <?xml version="1.0"?> | |
| <response> | |
| <sports> | |
| <sportsItem> | |
| <name>basketball</name> | |
| <id>40</id> | |
| <leagues> | |
| <leaguesItem> | |
| <name>NCAA Basketball</name> | |
| <abbreviation>mens-college-basketball</abbreviation> |