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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// ==UserScript== | |
// @name Overcast.fm Keyboard Shortcuts | |
// @namespace http://your.homepage/ | |
// @version 0.2 | |
// @description Space bar to play/pause, left/right arrow to seek forward/backward. | |
// @author @thatmarvin | |
// @match https://overcast.fm/+* | |
// @grant none | |
// ==/UserScript== |
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
/** | |
* The following is stolen from the patch that landed in 1.3.0-beta.13: | |
* https://github.com/angular/angular.js/pull/7999 | |
* | |
* Remove this if upgraded to Angular 1.3.x. | |
*/ | |
(function () { | |
'use strict'; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<script src="//code.angularjs.org/1.2.25/angular.js"></script> | |
<script src="//rawgit.com/angular-ui/ui-router/0.2.12/release/angular-ui-router.js"></script> | |
<script> | |
angular.module('fooApp', [ | |
'ui.router' |
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
module.exports = function (grunt) { | |
grunt.initConfig({ | |
stylus: { | |
compile: { | |
options: { | |
compress: true, | |
use: [ require('bootstrap.stylus') ] | |
}, | |
files: [{ | |
expand: true, |
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("ui.bootstrap", ["ui.bootstrap.tpls", "ui.bootstrap.position","ui.bootstrap.tooltip","ui.bootstrap.popover"]); | |
angular.module("ui.bootstrap.tpls", ["template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/popover/popover.html"]); | |
angular.module('ui.bootstrap.position', []) | |
/** | |
* A set of utility methods that can be use to retrieve position of DOM elements. | |
* It is meant to be used where we need to absolute-position DOM elements in | |
* relation to other, existing elements (this is the case for tooltips, popovers, | |
* typeahead suggestions etc.). | |
*/ |
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 mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
var assert = require('assert'); | |
mongoose.connect('mongodb://localhost/test'); | |
var OrderSchema = new Schema({ | |
total: { | |
type: Number, |
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 Q = require('q'); | |
require('should'); | |
require('mocha-as-promised')(); | |
// This pretends to be the API client | |
function get(url) { | |
var deferred = Q.defer(); | |
if (url === '/1') { | |
deferred.resolve([ |
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 strict'; | |
var express = require('express') | |
, app = module.exports = express.createServer(); | |
// Configuration | |
app.configure(function () { | |
app.use(app.router); | |
}); |
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
/* | |
Remember to fill in your API key. | |
usage: node postageapp.js [email protected] | |
*/ | |
var apiKey = 'FILL IN YOUR API KEY HERE', | |
postageapp = require('postageapp')(apiKey), | |
recipient = process.argv[2]; |
NewerOlder