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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "esnext", | |
"watch": true, | |
"lib": ["dom","es2017"] | |
} | |
} |
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
// get the average color of two rgb colors. | |
function avgcolor(color1,color2){ | |
/// declare vars | |
let avg, | |
hex16,ch16, | |
hex1,hex2, | |
r,g,b, | |
res; | |
// get average of channel hex |
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
/** | |
* GoJS Library | |
* @file GoJSDiagram.js | |
* @author Mariner Partners Inc | |
* @see https://gojs.net/ | |
*/ | |
import appEvents from 'app/core/app_events'; | |
import angular from '../angularjs/index'; | |
/** |
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
// BASE SETUP | |
// ============================================================================= | |
// call the packages we need | |
var express = require('express'); | |
var bodyParser = require('body-parser'); | |
var app = express(); | |
var request = require('request'); | |
// configure body parser |
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
this.defaultLargeChartOptions = { | |
chart: { | |
backgroundColor:'#f2f2f2' | |
}, | |
credits: { | |
enabled: false | |
}, | |
title : { | |
text : '' | |
}, |
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('garago.directives.contenteditable', []) | |
.directive("contenteditable", function($timeout, $garagoAPI, $rootScope) { | |
function toInnerText(value) { | |
var tempEl = document.createElement('div'), | |
text; | |
tempEl.innerHTML = value; | |
text = tempEl.textContent || ''; | |
return text.trim(); | |
} |
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
<figure> | |
<div id="twoface-demo"></div> | |
<figcaption>Before and after photos of Queensland</figcaption> | |
</figure> |
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
https://graph.facebook.com/oauth/access_token?client_id=<app_id>&client_secret=<app_secret>&grant_type=fb_exchange_token&fb_exchange_token=<token_to_exchange> |
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
Array.prototype.move = function (old_index, new_index) { | |
if (new_index >= this.length) { | |
var k = new_index - this.length; | |
while ((k--) + 1) { | |
this.push(undefined); | |
} | |
} | |
this.splice(new_index, 0, this.splice(old_index, 1)[0]); | |
return this; // for testing purposes | |
}; |
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 TodoCtrl($scope, $q, $timeout) { | |
function createPromise(name, timeout, willSucceed) { | |
$scope[name] = 'Running'; | |
var deferred = $q.defer(); | |
$timeout(function() { | |
if (willSucceed) { | |
$scope[name] = 'Completed'; | |
deferred.resolve(name); | |
} else { | |
$scope[name] = 'Failed'; |
NewerOlder