Skip to content

Instantly share code, notes, and snippets.

View peternguyenexpert's full-sized avatar

Peter Nguyen peternguyenexpert

View GitHub Profile
@peternguyenexpert
peternguyenexpert / gist:9ad086881d6927b36e2e3218a825e2e4
Created November 24, 2016 10:13 — forked from tonymtz/gist:d75101d9bdf764c890ef
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@peternguyenexpert
peternguyenexpert / favicon-interceptor.js
Created December 13, 2016 07:06 — forked from kentbrew/favicon-interceptor.js
How to short-circuit those annoying favicon requests in node.js
// early experiments with node had mysterious double requests
// turned out these were for the stoopid favicon
// here's how to short-circuit those requests
// and stop seeing 404 errors in your client console
var http = require('http');
http.createServer(function (q, r) {
// control for favicon