Skip to content

Instantly share code, notes, and snippets.

View auser's full-sized avatar

Ari auser

View GitHub Profile
var floatingButtonDirective = function() {
return {
restrict: 'AE',
scope: {
contents: '@'
},
template: '<div><div class="floating-button">Text: {{ contents }}</div></div>'
};
};
@auser
auser / app.js
Last active August 29, 2015 13:56
$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
@auser
auser / app.js
Last active August 29, 2015 13:56
Base starting point
// Develop our JS here
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;
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];
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'
@auser
auser / 0_reuse_code.js
Created April 19, 2014 05:33
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@auser
auser / app.js
Last active August 29, 2015 14:01
We couldn’t find that file to show.
// list
var list = [
{
letter: 'A',
members: [
'Ari Lerner',
'Abe Linc'
]
},
{
@auser
auser / app.js
Last active August 29, 2015 14:03
angular.module('myApp', [])
.controller('HomeController', function($scope) {
// Fill in the blanks to get weather
// on to the scope
});