Skip to content

Instantly share code, notes, and snippets.

View willpracht's full-sized avatar
👻

Will Pracht willpracht

👻
View GitHub Profile
@willpracht
willpracht / index.html
Created March 6, 2024 19:37
Multi Page Form (Pure CSS)
<div class="form">
<h2>Multi Page Form (Pure CSS)</h2>
<p>Divide long forms, enable users to flick back and forward.</p>
<p>Use JS to validate form at the end of the stage and highlight tab(s) that contain(s) error.</p>
<input id="one" type="radio" name="stage" checked="checked" />
<input id="two" type="radio" name="stage" />
<input id="three" type="radio" name="stage" />
<input id="four" type="radio" name="stage" />
<input id="five" type="radio" name="stage" />
@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*
@willpracht
willpracht / iife.js
Created April 10, 2015 17:32
Immediately-Invoked Function Expression (IIFE) Sublime snippet.
<snippet>
<content><![CDATA[
(function () {
'use strict';
${1:// body}
})();
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>iife</tabTrigger>
@willpracht
willpracht / verticalCenter.css
Created February 6, 2014 23:34
Vertically aligning something via translate.
.center {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
/*
Not even necessary really.
e.g. Height could be left out!
@willpracht
willpracht / mergeBranchIntoTrunk.bat
Created January 28, 2014 21:04
Common SVN branching scenarios.
cd /branches/myBranch
svn log --stop-on-copy
# note the revision number your branch at which your branch was created
cd /trunk
svn update
# note the revision number at which your trunk is at currently
svn merge -r[branchRevNum]:[trunkRevNum] svn+ssh://server/project/branch/myBranch
# resolve any conflicts