HTTP Working Group T. Berners-Lee, MIT/LCS INTERNET-DRAFT R. Fielding, UC Irvine <draft-ietf-http-v10-spec-05.html> H. Frystyk, MIT/LCS Expires August 19, 1996 February 19, 1996
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 dump(what, depth, colors) { | |
var util = require('util'); | |
console.log(util.inspect(what, { | |
depth: depth || 2, | |
colors: colors === undefined ? true : colors | |
})); | |
} |
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 initDnD(element, cb, accept = 'image/*') { | |
let input = document.createElement('input'); | |
input.type = 'file'; | |
input.accept = accept; | |
input.addEventListener('change', (e) => { | |
cb(input.files[0]); | |
}); | |
element.addEventListener('click', (e) => { | |
e.preventDefault(); | |
input.click(); |
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
body { | |
font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; | |
font-size: 16px; | |
line-height: 1.6; | |
width: 1000px; | |
margin: 0 auto; | |
word-wrap: break-word; | |
} | |
a[href] { |
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
const notifier = require('./notifier'); | |
notifier.sendMessage('Hello world!').then((res) => { | |
// handle response | |
}).catch((e) => { | |
console.error(e); | |
}); |
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
#!/usr/bin/osascript | |
tell application "Skype" | |
if (send command "GET MUTE" script name "MuteToggler") is equal to "MUTE ON" then | |
send command "SET MUTE OFF" script name "MuteToggler" | |
else | |
send command "SET MUTE ON" script name "MuteToggler" | |
end if | |
end tell |
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 | |
# List changed files | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_file() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" | |
} | |
check_file "package.json" "npm install" |
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 e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
module.exports = { | |
foo: 'bar' | |
}; | |
},{}],2:[function(require,module,exports){ | |
var foo = require('./foo.js'); | |
},{"./foo.js":1}]},{},[2]); |
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
const React = require('react'); | |
const classNames = require('classnames'); | |
const Input = React.createClass({ | |
propTypes: { | |
id: React.PropTypes.string.isRequired, | |
className: React.PropTypes.string, | |
title: React.PropTypes.string, | |
help: React.PropTypes.string, | |
type: React.PropTypes.oneOf([ |