Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
#!/bin/bash | |
# Adapted from Erik Johnson's script at | |
# http://terminalmage.net/2011/11/17/setting-a-usb-headset-as-the-default-pulseaudio-device/ | |
# | |
# Updated by Edward Faulkner <ef@alum.mit.edu> to move existing | |
# streams and eliminate the extra fork script. | |
# You'll need to change these to point at your headset device. | |
OUTPUT="alsa_output.usb-Generic_FREETALK_Everyman_0000000001-00-Everyman.analog-stereo" |
var open = window.XMLHttpRequest.prototype.open, | |
send = window.XMLHttpRequest.prototype.send, | |
onReadyStateChange; | |
function openReplacement(method, url, async, user, password) { | |
var syncMode = async !== false ? 'async' : 'sync'; | |
console.warn( | |
'Preparing ' + | |
syncMode + | |
' HTTP request : ' + |
Apache James 2.3.2, delivering to a local user, default setup | |
$ time /usr/libexec/postfix/smtp-source -c -l 5000 -t testuser@localhost -s 100 -m 10000 127.0.0.1:25 | |
10000 | |
real 1m5.751s | |
user 0m0.630s | |
sys 0m1.945s | |
#!/usr/bin/env node | |
// Reads JSON from stdin and writes equivalent | |
// nicely-formatted JSON to stdout. | |
var stdin = process.stdin, | |
stdout = process.stdout, | |
inputChunks = []; | |
stdin.resume(); |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Last updated: 2017-03-18
exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .
###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs
// setOps.js MIT License © 2014 James Abney http://github.com/jabney | |
// Set operations union, intersection, symmetric difference, | |
// relative complement, equals. Set operations are fast. | |
(function(so) { | |
'use strict'; | |
var uidList = [], uid; | |
// Create and push the uid identity method. |
var elements = document.querySelectorAll("div"), | |
callback = (el) => { console.log(el); }; | |
// Spread operator | |
[...elements].forEach(callback); | |
// Array.from() | |
Array.from(elements).forEach(callback); | |
// for...of statement |