Skip to content

Instantly share code, notes, and snippets.

View sfw185's full-sized avatar

Simon Wardan sfw185

View GitHub Profile
@sfw185
sfw185 / restart coreaudio daemon
Created November 3, 2018 22:00 — forked from felipecsl/restart coreaudio daemon
Restart Mac OS X coreaudio daemon. Useful if you cannot change the audio output device to Airplay.
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
@sfw185
sfw185 / proxy.js
Created August 24, 2017 01:53 — forked from cmawhorter/proxy.js
Node script to forward all http requests to another server and return the response with an access-control-allow-origin header. Follows redirects.
// Usage: node proxy.js
// Open browser and navigate to http://localhost:8080/[url]
// Example: http://localhost:8080/http://www.google.com
var url = require('url')
, http = require('http')
, https = require('https');
var PORT = process.argv[2] || 8080;
var server = http.createServer(function(req, res) {