Skip to content

Instantly share code, notes, and snippets.


Phil Kauffman papamoose

View GitHub Profile
papamoose /
Last active Jan 23, 2020
PDM60 on Linux notes

dmesg output when plugging in the usb serial cable:

[161312.500002] usb 3-2: new full-speed USB device number 3 using xhci_hcd
[161312.926854] usb 3-2: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[161312.926860] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[161312.926863] usb 3-2: Product: FT232R USB UART
[161312.926866] usb 3-2: Manufacturer: FTDI
[161312.926869] usb 3-2: SerialNumber: AC01PV6Q
[161312.966524] usbcore: registered new interface driver usbserial_generic
[161312.966534] usbserial: USB Serial support registered for generic
# For mojave only
# In order for this to work, you will need to go to System Preferences in Mojave -> Security & Privacy -> Privacy -> Full Disk Access and grant permissions
import sqlite3
conn = sqlite3.connect('/var/db/SystemPolicyConfiguration/KextPolicy')
c = conn.cursor()
query = 'SELECT * FROM kext_policy'
papamoose /
Last active Oct 1, 2019 — forked from robinsmidsrod/
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
else {
    filename "undionly.kpxe";

(or see for a more elaborate setup

papamoose / python3_virtualenv.txt
Created Jul 12, 2018 — forked from wynemo/python3_virtualenv.txt
creating a python3 virtualenv environment
View python3_virtualenv.txt
#install gcc git build-essential python3
$ sudo aptitude install gcc git build-essential python3
$ curl -O
$ mkdir python3_prole
$ cd python3_prole/
$ python -p /usr/bin/python3 env
$ python --relocatable -p /usr/bin/python3 env
papamoose /
Created May 7, 2018 — forked from lebedov/
Python functions for finding open files and PIDs that have opened a file.
#!/usr/bin/env python
Python functions for finding open files and PIDs that have opened a file.
import numbers
import subprocess
papamoose /
Created Feb 18, 2018 — forked from ykarikos/
Howto start using Letsencrypt with simp_le

Howto start using Letsencrypt with simp_le

What I had:

What I wanted:

  • A Letsencrypt certificate for Apache, Postfix and Dovecot
  • Simple tool for managing certificates that does need root privileges
  • Automatic renewal
papamoose / pg_stat_statements
Created Feb 7, 2018 — forked from troyk/pg_stat_statements
enable postgres pg_stat_statements
View pg_stat_statements
1) see re: increasing shmmax
2) add to postgresql.conf:
shared_preload_libraries = 'pg_stat_statements' # (change requires restart)
136 pg_stat_statements.max = 1000
137 pg_stat_statements.track = all
3) restart postgres
4) check it out in psql
papamoose /
Created Jan 26, 2018 — forked from hofmannsven/
My simply Git Cheatsheet
View gist:d22dec424d53c172a0bc39f2cf1f5ae0
Renew Puppet CA cert.
Not the perfect idea, but should alleviate the need to resign every cert.
What you need from existing puppet ssl directory:
Create an openssl.cnf:
papamoose /
Last active Nov 26, 2018
add non-free firmware into initrd.gz
set -e
# trap keyboard interrupt (control-c)
trap control_c INT
# Must be run as root
# requires:
# - wget
# - pax
You can’t perform that action at this time.