Skip to content

Instantly share code, notes, and snippets.

@tonymtz
tonymtz / gist:d75101d9bdf764c890ef
Last active Jul 6, 2021
Uninstall nodejs from OSX Yosemite
View gist:d75101d9bdf764c890ef
# 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*
@jibiel
jibiel / google_analytics_including_today.user.js
Created Sep 28, 2012
Include today in Google Analytics' default date range (updated for 2012)
View google_analytics_including_today.user.js
// ==UserScript==
// @name Google Analytics - Include Today
// @author Storm Consultancy & jibiel
// @description Include today in Google Analytics' default date range
// @include https://www.google.com/analytics/web/*
// @version 1.1
// ==/UserScript==
// Function to add days to a date, use negative number to subtract
function addDays(myDate,days) {