hithat: local Node/Browser development with Chrome DevTools
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 nodes (on, node) { | |
return [].slice.call(node.childNodes) | |
.map(nodes.bind(null, on)) | |
.reduce( | |
function (sum, x) { | |
return (Array.isArray(x) ? x : [x]).concat(sum) | |
}, [node] | |
) | |
.filter(Boolean) | |
.forEach((node) => { |
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 root = { | |
'path': '/root', | |
'type': 'directory', | |
'key': '/', | |
'entries': [ | |
{ | |
'path': 'a.out', | |
'entries': [], | |
'type': 'file' | |
}, |
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 | |
APP_DIR=x | |
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )" | |
GIT_WORK_TREE=$APP_DIR git checkout master -f | |
cd $APP_DIR | |
npm i --production | |
pm2 startOrGracefulReload $APP_DIR/processes.json | |
cd $REPO_DIR | |
exec git update-server-info |
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 domify = require('domify') | |
var inherits = require('inherits') | |
var EventEmitter = require('events').EventEmitter | |
var insertCss = require('insert-css') | |
var fs = require('fs') | |
var path = require('path') | |
inherits(Widget, EventEmitter) | |
function Widget () { |
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 forms = require('mschema-forms') | |
document.body.appendChild(forms.generate({ | |
type: "generic", | |
form: { | |
legend: "My Form" | |
}, | |
schema: { | |
url: { type: "string", default: "http://mschema.org" }, | |
height: { type: "number", default: 0 }, |
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 forms = require('mschema-forms') | |
document.body.appendChild(forms.generate({ | |
type: "generic", | |
form: { | |
legend: "My Form" | |
}, | |
schema: { | |
url: { type: "string", default: "http://mschema.org" }, | |
height: { type: "number", default: 0 }, |
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
osascript -e 'tell application "Iterm" to activate' -e 'tell application "System Events" to tell process "Iterm" to keystroke "d" using command down' |
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
input { | |
tcp { | |
port => 9000 | |
type => json | |
} | |
udp { | |
port => 9000 | |
type => json |