Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<style>
body, html {
margin: 0;
padding: 0;
}
h1 {
margin: 0 0 2em 0;
@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
prowl_api_key = [redacted]
[cackhanded]
password = [redacted]
skip_dm = 1
[pubstandards]
password = [redacted]
skip_mention = 1
#!/ports/bin/perl
# -*- Mode: Perl; tab-width: 4; indent-tabs-mode: nil; -*-
use Modern::Perl;
use CDDB;
use Config::Std { def_sep => '=' };
use FileHandle;
use Getopt::Std;
use Readonly;
@norm
norm / ec2-bin.sh
Created October 3, 2009 00:46
Silencing EC2 errors on Snow Leopard. Also see http://bit.ly/silencing-ec2
To stop being annoyed by Java errors when using the EC2 API tools
on Snow Leopard, apply the following patch:
--- /ports/bin/ec2-cmd 2009-10-03 01:44:04.000000000 +0100
+++ /tmp/ec2-cmd 2009-10-03 01:44:54.000000000 +0100
@@ -58,4 +58,13 @@
CMD=$1
shift
-"$JAVA_HOME/bin/java" $EC2_JVM_ARGS $cygprop -classpath "$CP" com.amazon.aes.webservices.client.cmd.$CMD "$@"
@norm
norm / checksoftwareupdate
Created February 24, 2010 23:49
wrapper around 'softwareupdate -l' to silence it when no updates exist
#!/bin/sh
#
# wrapper around 'softwareupdate -l' to silence it when no updates exist
# -- Mark Norman Francis <norm@cackhanded.net>
OUTPUT=`mktemp /tmp/checksoftup.XXXXX`
ERRORS=`mktemp /tmp/checksoftup.XXXXX`
# capture output to separate files
softwareupdate -l >$OUTPUT 2>$ERRORS
add_to_itunes = 0
install_encodes = 0
trash_directory = /home/norm/Downloads/DONE
trash_files = 0
[rationalise]
Castle (2009) = Castle
American Dad_ = American Dad!
American Dad = American Dad!
Star Wars_ The Clone Wars (2008) = Star Wars - The Clone Wars
# Reconstructed via infocmp from file: /usr/share/terminfo/78/xterm-color
xterm-color|nxterm|generic color xterm,
am, km, mir, msgr, xenl,
colors#8, cols#80, it#8, lines#24, ncv@, pairs#64,
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=^M,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J,
speed 9600 baud; 50 rows; 80 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo
-extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel iutf8
-ignbrk brkint -inpck -ignpar -parmrk
oflags: opost onlcr -oxtabs -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
-dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
@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