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
Font=Inconsolata for Powerline | |
FontHeight=12 | |
Transparency=off | |
CursorType=line | |
ForegroundColour=131,148,150 | |
BackgroundColour=0,43,54 | |
CursorColour=220,50,47 | |
Black=7,54,66 | |
BoldBlack=30,73,84 | |
Red=220,50,47 |
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
// in | |
const a = ['x', 'y', 'z']; | |
const b = a.map(c => c + c); | |
const c = a.reduce((acc, c) => acc + c, ''); | |
a.forEach(c => console.log(c)); | |
a.forEach(console.log); | |
// out | |
const a = ['x', 'y', 'z']; |
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
data:text/html,<!DOCTYPE html><title></title><script>(function(){/* TO CREATE YOUR OWN PAGE, COPY EVERYTHING BETWEEN THE OUTER MOST CURLY BRACES INTO THE CONSOLE AND THEN EITHER RUN `save('THE BODY CONTENTS YOU WANT')` OR RUN `document.body.contentEditable = true` EDIT THE PAGE AS A WYSIWYG AND THEN RUN `save()` */var LZString=function(){function w(b,f){if(!y[b]){y[b]={};for(var g=0;g<b.length;g++)y[b][b.charAt(g)]=g}return y[b][f]}var u=String.fromCharCode,y={},k={compressToBase64:function(b){if(null==b)return"";b=k._compress(b,6,function(b){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b)});switch(b.length%4){default:case 0:return b;case 1:return b+"===";case 2:return b+"==";case 3:return b+"="}},decompressFromBase64:function(b){return null==b?"":""==b?null:k._decompress(b.length,32,function(f){return w("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b.charAt(f))})},compressToUTF16:function(b){return null==b?"":k._compress(b,15,function(b){return u(b+32 |
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 Global = typeof global === 'object' ? | |
global : | |
typeof window === 'object' ? | |
window : | |
typeof self === 'object' ? | |
self : | |
{}; | |
var Promise = Global.Promise || require('bluebird'); | |
var exports = typeof module === 'object' ? module.exports : {}; |
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
#!/bin/sh | |
id=$1 | |
branch=$2 | |
branch="${branch:-pr-$id}" | |
git fetch origin pull/$id/head:$branch | |
git checkout $branch |
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
import {renderToStaticMarkup} from 'react-dom/server'; | |
import {html as beautifyHTML} from 'js-beautify'; | |
import {diffWords} from 'diff'; | |
import chalk from 'chalk'; | |
import {fail} from 'assert'; | |
const colors = new chalk.constructor({ | |
enabled: !!global.top.karma | |
}); |
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
import deact from 'https://wzrd.in/standalone/deact'; | |
const sayHi = () => console.log('hi'); | |
const firstName = 'Moshe'; | |
const lastName = 'Kolodny'; | |
const todos = [ 'make todos list', 'something else?' ]; | |
const domElement = deact` | |
<div> | |
<h1>Hello ${firstName} ${lastName}</h1> |
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
import update from 'react-addons-update'; | |
global.update = update; |
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
// Simple proxy/forwarding server for when you don't want to have to add CORS during development. | |
// Usage: node proxy.js | |
// Open browser and navigate to http://localhost:9100/[url] | |
// Example: http://localhost:9100/http://www.google.com | |
// This is *NOT* for anything outside local development. It has zero error handling among other glaring problems. | |
// This started as code I grabbed from this SO question: http://stackoverflow.com/a/13472952/670023 |
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
import React from 'react'; | |
import ReactDOMServer from 'react-dom/server'; | |
import assert from 'assert'; | |
function render(jsx) { | |
return ReactDOMServer.renderToStaticMarkup(jsx); | |
} | |
function assertEqual(actual, expected) { | |
assert.equal(render(actual), render(expected)); |