Skip to content

Instantly share code, notes, and snippets.

turingbirds / GNUPG
Last active Jul 13, 2021
GPG (GNUPG) Cheatsheet


Setting up: key generation

This generates a public/private keypair.

$ gpg --gen-key
$ gpg --list-secret-keys
turingbirds / Agilent 82357B GPIB interface programming on Ubuntu Linux.rst
Last active Jun 25, 2021
Agilent 82357B GPIB interface programming on Ubuntu Linux
View Agilent 82357B GPIB interface programming on Ubuntu Linux.rst

GPIB interfacing using Agilent 82357B on Ubuntu Linux

I initially had some problems installing on my laptop, so decided to boot Ubuntu 12.04.5 LTS, 3.13.0-32-generic from USB and work from there.

For an automated installation script, see (and gpib.conf) below. The rest of this document describes the actions of the installation script step-by-step.

First, get the packages that are necessary to support Python bindings:

turingbirds / moore_penrose_pseudoinverse.c
Last active Mar 24, 2021
Compute the (Moore-Penrose) pseudo-inverse of a libgsl matrix in plain C.
View moore_penrose_pseudoinverse.c
* Compute the (Moore-Penrose) pseudo-inverse of a libgsl matrix in plain C.
* Compile uding:
* gcc moore_penrose_pseudoinverse.c -lgsl -lblas
* Dependencies:
* - libgsl (GNU Scientific Library)
* - libblas (Basic Linear Algebra Subprograms)
View Bessel filter design.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
turingbirds /
Created Apr 30, 2020
Manually launch xscreensaver; disable auto-activate
# I do not want my screensaver to auto-activate after a timeout.
# For some reason, you *have* to select a nonzero, finite timeout value for xscreensaver (there's no "infinity").
# I only want my screensaver to active when I lock my system by pressing [Meta]+[L].
# This hotkey is set up to launch this script, which
# - starts the xscreensaver daemon,
# - activates the screensaver (with lockscreen enabled),
# - waits for it to terminate (unlocking logs an "UNBLANK" event),
# - then kills the xscreensaver daemon.
View ip_cam_ethernet_usb.rst

Connect an IP camera via wired ethernet to an ethernet USB adapter to a Raspberry Pi

Connect the camera to the ethernet USB adapter via a CROSSOVER cable (or via an ethernet switch).

Install DHCP server:

sudo apt install isc-dhcp-server
turingbirds / upload.php
Last active May 30, 2019
a simple php upload script
View upload.php
header("Content-Type: text/html; charset=utf-8");
function display_filesize($filesize) {
if (is_numeric($filesize)) {
$decr = 1024;
$step = 0;
$prefix = array('Byte','KB','MB','GB','TB','PB');
View Git cheatsheet.markdown

Git cheatsheet

Set up Git

git config --global ""
git config --global "John Doe"
turingbirds / inkscape_to_dxf.rst
Last active Feb 24, 2019
From InkScape to DXF
View inkscape_to_dxf.rst

From InkScape to DXF

1. Save in Inkscape as PDF

Draft your design in InkScape. If there's any text, convert it to a path before or during exporting (Path → Object to Path).

Save as PDF (tested PDF v1.5).

turingbirds / bwedge.scad
Last active Sep 6, 2018
Beveled wedge shape for OpenSCAD
View bwedge.scad
// Beveled wedge shape for OpenSCAD
// Written by C.A.P. Linssen <>, Sept 2018
// This software is distributed under the "CC0 1.0 Universal (CC0 1.0)" license.
// You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <>.
// module bwedge