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
/** | |
Takes a dividend and a divisor and returns a quotient. | |
``` | |
divide(4,2); | |
//2 | |
var divTen = divide(10); | |
divTen(2); | |
//5 |
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
#include "Adafruit_Thermal.h" | |
// Pass addr to printer constructor | |
Adafruit_Thermal printer(&Serial1); | |
Adafruit_Thermal printer2(&Serial3); | |
// ----------------------------------------------------------------------- | |
void setup() { |
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
// dependencies ---------------------------------------------------------------------- | |
import Reflux from 'reflux'; | |
import Actions from '../actions/Actions'; | |
import request from 'superagent'; | |
import config from '../config'; | |
let UserStore = Reflux.createStore({ | |
// store setup ----------------------------------------------------------------------- |
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
angular.module('app').directive('overlay', overlay); | |
function overlay () { | |
return { | |
restrict: 'E', | |
transclude: true, | |
scope: {active: '=', text: '='}, | |
template: '<div class="introjs-overlay" ng-show="active" ng-click="active = false;"></div>' + | |
'<div class="mock-intro" ng-show="active">' + | |
'<div class="mock-intro-text" ng-show="active">{{text}}</div>' + |
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
.filter('timeago', function () { | |
/* | |
* time: the time | |
* local: compared to what time? default: now | |
* raw: wheter you want in a format of "5 minutes ago", or "5 minutes" | |
*/ | |
// parse string date to milliseconds | |
// Note: months are 0-based |