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
| var https = require('https'); | |
| var Github = module.exports = { | |
| setAuthToken: function (token) { | |
| this.access_token = token; | |
| }, | |
| send: function (path, callbk) { | |
| if (this.access_token != undefined) { | |
| options = { | |
| host: 'api.github.com', |
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
| body { color: white; } |
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
| exports.parseURL = function(url, opts) { | |
| var options={}; | |
| if(typeof opts=="function"){ | |
| options.cb = opts; | |
| } else { | |
| options=opts; | |
| } | |
| request(url, function(error, response, body) { | |
| if (!error) { |
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
| # snip | |
| Spork.prefork do | |
| #snip | |
| class ActiveSupport::TestCase | |
| setup :mark_test_start_time | |
| teardown :record_test_duration | |
| def mark_test_start_time | |
| @start_time = Time.now | |
| 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
| var test = require('../spec_helper'); | |
| beforeEach(function() { | |
| this.addMatchers({ | |
| toErrorWith: function (expectedMessage) { | |
| var resp = this.actual; | |
| this.actual = resp['error']; | |
| this.message = function() { | |
| return "Expected response to return error '"+expectedMessage+"'"; | |
| } |
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 "csv" | |
| class CD | |
| attr_reader :band_name, :album_name | |
| def initialize(band_name, album_name) | |
| @band_name = band_name | |
| @album_name = album_name | |
| end | |
| def to_string |
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
| source "http://rubygems.org" | |
| gem 'tassadar', :git => 'git://github.com/agoragames/tassadar.git' |
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
| function real_fib(n) { | |
| var i; | |
| var fibs = new Array(0, 1); | |
| for(i=0; i<n; i++) { | |
| fibs.push(fibs[0] + fibs[1]); | |
| fibs.shift(); | |
| } | |
| return fibs[0]; | |
| } |
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
| var mongoose = require('mongoose'); | |
| mongoose.createSetConnection('mongodb://host1:12345/testdb, mongodb://host2:12345/testdb, mongodb://host3:12345/testdb', function (err) { | |
| if (err) { | |
| console.log("could not connect to DB: " + err); | |
| } | |
| }) | |
| // CONNECTED |
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
| 1.9.3-p0 in shared_assets/ on jasmine | |
| › brew install qt 1 | |
| ==> Downloading https://downloads.sourceforge.net/project/machomebrew/Bottles/qt-4.7.3-bottle.tar.gz | |
| ######################################################################## 100.0% | |
| Error: SHA1 mismatch | |
| Expected: 6ab865b92db92cf2c49a332010f99566178d25cf | |
| Got: a50123be33c96cba97d4bcee61f3859c7d52000e | |
| Archive: /Users/cadwallion/Library/Caches/Homebrew/Bottles/qt-4.7.3.tar.gz | |
| (To retry an incomplete download, remove the file above.) |
OlderNewer