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
import {merge} from 'lodash'; | |
import {autorun} from 'mobx'; | |
// TODO: find a good polyfill for this | |
declare const URLSearchParams; | |
const routeMatcher = require("route-matcher").routeMatcher; | |
const createBrowserHistory = require('history/createBrowserHistory').default; | |
/* | |
* A store have to implement these two getters to be routable |
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
[ | |
{ | |
"key": "shift+cmd+d", | |
"command": "editor.action.copyLinesDownAction" | |
}, | |
{ | |
"key": "cmd+l", | |
"command": "expandLineSelection" | |
}, |
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
function add (arg1, arg2, cb) { | |
return (new Promise(reject, resolve) { | |
if (typeof arg1 !== 'number') { | |
reject(new TypeError('arg1 should be a number')); | |
} | |
if (typeof arg2 !== 'number') { | |
reject(new TypeError('arg2 should be a number')); |
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
{ | |
"apiVersion": "1.0.0", | |
"swaggerVersion": "1.2", | |
"basePath": "http://swagger.io", | |
"resourcePath": "/people/@me", | |
"produces": [ | |
"application/xml", | |
"application/json" | |
], | |
"consumes": [ |
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
keys | |
uniqueId | |
isEmpty | |
bind | |
once | |
each | |
extend | |
defaults | |
result | |
clone |
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
var https = require('https'); | |
var fs = require('fs'); | |
var url = 'https://raw.githubusercontent.com/dconnolly/chromecast-backgrounds/master/backgrounds.json'; | |
Array.prototype.getLast = function() { | |
return this[this.length - 1]; | |
}; | |
function logFail(err){ | |
console.log('Failed!'); |
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
{ | |
"opts": { | |
"properties": { | |
"modelPackage": "com.reverb.models", | |
"apiPackage": "com.reverb.apis", | |
"groupId": "com.reverb.swagger", | |
"artifactId": "swagger-client", | |
"artifactVersion": "1.0.0" | |
}, | |
"uri": "http://petstore.swagger.wordnik.com/api/api-docs" |
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
names = [ | |
"A", | |
"ABLE", | |
"ABOUT", | |
"ABOVE", | |
"ACCORDING", | |
"ACCOUNT", | |
"ACROSS", | |
"ACT", | |
"ACTION", |
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
/* Invert all the things! */ | |
html | |
{ | |
-webkit-filter: invert(1) grayscale(0.6); | |
} | |
/* Execpt these guys... */ | |
img, | |
.minibutton, | |
.state-indicator, |
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
var fs = require('fs'); | |
var random = (~~(Math.random() * 1e9)).toString(2); | |
fs.writeFile('./random.txt', random, function(err){ | |
if(err) console.error(err); | |
else console.log('file has been written'); | |
}); |