Skip to content

Instantly share code, notes, and snippets.

View scruss's full-sized avatar
💭
🦆

Stewart Russell scruss

💭
🦆
View GitHub Profile
@scruss
scruss / Greg Annandale's photo locations for Raspberry Pi Foundation's PIXEL wallpaper.geojson
Last active November 12, 2016 18:19
Greg Annandale's photo locations for Raspberry Pi Foundation's PIXEL wallpaper
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@scruss
scruss / Milwaukee_Street_Names_from_OSM.txt
Created November 19, 2016 14:14
Milwaukee Street Names from OSM for Jeff
Abbott
Abert
Acacia
Access
Achilles
Adams
Adler
Aetna
Afton
Ahmedi
pbpaste | sed 's/^/ /; s/ | / \| \\ \n /g;s/$/\n/;'
@scruss
scruss / lct0346_01.geojson
Last active March 9, 2017 13:38
LCT 0346.01
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@scruss
scruss / Raspbian-dpkg-l-20170315-scruss.txt
Created March 16, 2017 01:11
`dpkg -l` output from stock Raspbian 2017-03-02 Jessie image
# `dpkg -l` output from stock Raspbian 2017-03-02 Jessie image
# scruss - 2017-03-15
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================-=========================================-============-==================================================================================================
ii acl 2.2.52-2 armhf Access control list utilities
ii adduser 3.113+nmu3 all add and remove users and groups
@scruss
scruss / dwim-ocr.sh
Created April 11, 2017 20:37
dwim-ocr.sh - ocr a pdf document to current directory as mono bitmap
#!/bin/bash
# dwim-ocr.sh - ocr a pdf document to current directory as mono bitmap
# created by scruss on Fri 11 May 2012 19:56:03 EDT
# $Id: dwim-ocr.sh,v 1.5 2017/03/28 20:58:39 scruss Exp $
set -eu
input="$1"
# uses $2 if specified, sensible default otherwise
output=${2:-${1%\.*}-ocr.pdf}
# but check that the output isn't a bare file or pdfbeads will choke
@scruss
scruss / Reach3d Resources.md
Created April 15, 2017 21:19
Reach3d Resources
@scruss
scruss / pdf-meta.py
Created April 20, 2017 02:52
pdf-meta.py - extract metadata from first PDF file given as argument
#!/usr/bin/env python3
# extract metadata from first PDF file given as argument
# scruss - 2017
# -*- coding: utf-8 -*-
import sys
from PyPDF2 import PdfFileReader
inputPdf = PdfFileReader(open(sys.argv[1], "rb"))
docInfo = inputPdf.getDocumentInfo()
@scruss
scruss / main.py
Created October 6, 2017 02:18
CircuitPython 2.0.0 - Trinket M0 - 3 led bounce
# CircuitPython 2.0.0 - Trinket M0
# 3 led bounce:
# LED anodes to D0, D1 & D2
# cathodes common thru 330 Ω resistor to GND
# scruss - 2017-10
import board
import digitalio
import time
@scruss
scruss / main.py
Created October 15, 2017 03:43
CircuitPython: 16 blinky Neopixels
# CircuitPython 2.0.0 - Trinket M0
# 16 neopixels on D4
import board
import neopixel
import adafruit_dotstar as dotstar
import time
# built-in dotstar
dot = dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1,