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
# ActiveRecord 2.3.8 - Associations + namescoped models patch. | |
# | |
# Problem: | |
# module App::Model | |
# class Base < ActiveRecord::Base | |
# # some base class logic... | |
# end | |
# | |
# class User < App::Model::Base | |
# set_table_name :users |
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
var assert = require('assert'); | |
/** | |
* Default pattern | |
* | |
* Inherits properties added to this and prototype | |
*/ | |
// parent constructor: | |
function Parent(name) { |
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
var should = require('should') | |
, assert = require('assert') | |
, request = require('request') | |
, qs = require('querystring'); | |
describe('keen api', function () { | |
var projectId = 'my_project_id' | |
, masterKey = 'my_master_key' | |
, writeKey = 'my_write_key' | |
, readKey = 'my_read_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
{ | |
liked: 0, | |
foursquareVenueId: null, | |
userId: 988872511955898400, | |
private: 0, | |
likes: { | |
count: 0, | |
records: [ | |
], |
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
function slowGreeting(timeout) { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve('Hello WorldzZzZzzz'); | |
}, timeout); | |
}) | |
} | |
// Assigns the promise value to a variable and returns the variable: | |
async function getSlowGreeting() { |