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
$http({ | |
method: 'GET', | |
url: 'http://api.flickr.com/services/rest', | |
params: { | |
// Flickr API parameters | |
method: 'flickr.interestingness.getList', | |
api_key: apiKey, | |
format: 'json', | |
per_page: 3, | |
nojsoncallback: 1 |
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
// Develop our JS here |
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 styleObject = function() { | |
this.classes = null; | |
var allClasses = document.styleSheets; | |
for (var i = 0; i < allClasses.length; i++) { | |
var cls = allClasses[i]; | |
if (cls.title === "nvd3") { | |
this.classes = cls.rules; | |
break; |
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 difference(a, b) { | |
var out = {}; | |
if (!a || !b) return out; | |
for (var key in a) { | |
if (b.hasOwnProperty(key) && typeof(b[key]) !== "undefined") { | |
if (a[key] !== b[key]) { | |
console.log('difference', a[key], '|', b[key]); | |
out[key] = a[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
require 'rubygems' | |
require 'httparty' | |
require 'pp' | |
# Config | |
backend = "http://localhost:3000/" # FILL IN YOUR OWN SPREE ENDPOINT | |
apiKey = '' # FILL IN A USER's APIKEY | |
key = '' # FILL IN YOUR OWN STRIPE publishable key | |
cardNum = '4242424242424242' # | |
exp_month = '1' |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
// list | |
var list = [ | |
{ | |
letter: 'A', | |
members: [ | |
'Ari Lerner', | |
'Abe Linc' | |
] | |
}, | |
{ |
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
angular.module('myApp', []) | |
.controller('HomeController', function($scope) { | |
// Fill in the blanks to get weather | |
// on to the scope | |
}); |
OlderNewer