Skip to content

Instantly share code, notes, and snippets.

View kuhnza's full-sized avatar

Dave Kuhn kuhnza

  • Sydney, Australia
View GitHub Profile
#!/usr/bin/env bash
#
# Configure Chrome OS Linux env just the way I like it. Must be run as sudo.
#
set -ex
# Install Powerline fonts
apr install fonts-powerline
@kuhnza
kuhnza / http-request-dumper.js
Last active May 3, 2024 13:59
A simple node server that dumps raw incoming http requests out to the command line.
var http = require('http');
var LISTEN_ON_PORT = 3000;
function toTitleCase(str) {
return str.replace(/[a-z]*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
}
http.createServer(function (req, res) {
var body;