Skip to content

Instantly share code, notes, and snippets.

View willpracht's full-sized avatar
👻

Will Pracht willpracht

👻
View GitHub Profile
@willpracht
willpracht / ubuntu_unattended_upgrades_gmail.markdown
Created September 26, 2018 03:56 — forked from roydq/ubuntu_unattended_upgrades_gmail.markdown
Unattended upgrades on Ubuntu 14.04 with email notifications

Getting Started

Do yourself a favor and login as root to save yourself some time and headaches:

$ sudo su -

Install unattended-upgrades:

@willpracht
willpracht / pi-gpio-butons.py
Created January 5, 2017 18:30 — forked from joelongstreet/pi-gpio-butons.py
Listen for GPIO input from a raspberry pi - open menu and power off
# Import the RPi.GPIO and OS
import RPi.GPIO as GPIO
import os
import sys
import time
# GPIO port setup
GPIO.setmode(GPIO.BCM)
# Power switch: will send a shutdown message to the OS
@willpracht
willpracht / temp.js
Created December 28, 2016 17:35 — forked from joelongstreet/temp.js
Joe implemented async and it should work now, I guess. :D
#!/usr/bin/env node
'use strict';
const chalk = require('chalk');
const del = require('del');
const fs = require('fs');
const google = require('googleapis');
const googleAuth = require('google-auth-library');
const _ = require('lodash');
@willpracht
willpracht / gist:7aeaf95ff6c497dc2ca0a91e7f138efe
Created July 27, 2016 19:34 — 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*