Skip to content

Instantly share code, notes, and snippets.

@norm
norm / set up a new mac.markdown
Last active December 14, 2016 02:14
How I set up a new Mac from scratch

setting up a new Mac

From a fresh install of macOS

To set up a new Mac, or a freshly installed macOS, I do the following:

  1. Create the first account king without iCloud as a spare account, and as a administrator. This allows me to turn off administrator access to my normal account if I want.
@norm
norm / README.markdown
Last active October 2, 2016 12:36
AntiRSI control script

antirsi

Control whether [AntiRSI][a] is running from the command line.

Usage

  • antirsi on — start AntiRSI now
  • antirsi off [n] — turn AntiRSI off for n hours (default: 1)
  • antirsi — start AntiRSI if it is time to
@norm
norm / all.txt
Last active April 6, 2016 11:25 — forked from psd/all.txt
Find words containing all of the vowels, in order
$ egrep 'a.*e.*i.*o.*u' /usr/share/dict/words
abietineous
abstemious
abstemiously
abstemiousness
abstentious
acetabuliferous
acetarious
acheilous
acheirous
Takes about two hours to make. Feeds 8.
@norm
norm / custom version of cdparanoia.markdown
Last active September 16, 2015 16:32
Custom version of cdparanoia

I have a perl script that [automates ripping and converting CDs][rip]. It uses cdparanoia to get the audio from the CD. cdparanoia has a nice progress bar when ripping, but also outputs a lot of extra guff. If you use -q to quiet the guff, the progress bar also goes away. So I [patch cdparanoia][patch] to have an option to preserve the progress bar when quiet.

cd ~/Downloads
wget http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-10.2.src.tgz
wget https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/patch-paranoia_paranoia.c.10.4.diff

wget https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/osx_interface.patch

Takes about two hours to make. Feeds 6-8.
@norm
norm / Makefile
Created July 16, 2015 13:50
Minimum Viable Python-only automatic SASS compilation
.PHONY: css
CSS=static/screen.css
css: $(CSS)
clean:
rm $(CSS)
$(CSS): static/%.css: sass/%.scss
<!DOCTYPE html>
<html>
<head>
<style>
body, html {
margin: 0;
padding: 0;
}
h1 {
margin: 0 0 2em 0;
@norm
norm / custom.css
Last active December 27, 2015 01:49
Mainstream fourth wall display repositories
#pulls li.age-aging,
#pulls li.age-old {
background: #9Fa098;
}
@norm
norm / gist:6140268
Created August 2, 2013 14:28
100 characters wide preview
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1 2 3 4 5 6 7 8 9 0
1