Technical notes, my online memory

Tuesday, February 23, 2016

Unpack a debian .deb package

›
When you are building .deb's it's handy to be able to unpack them to check the contents, especially postinst and similar scripts. Th...

Creating a debian package that can run with System V, Upstart, or Systemd

›
We now have a gaggle of ways daemons can be run on linux, and ubuntu in particular. I want my .deb to be installable on a wide range of ubun...
Friday, February 19, 2016

Storing and using GPG keys on the Yubikey

›
I wanted to move to using GPG keys for encryption and signing stored on a Yubikey 4. There's a bunch of HOWTOs out there, I'll put a...
Monday, October 26, 2015

Return a new return_value for each call when mocking tempfile in python

›
Here is a python snippet that mocks out tempfile.NamedTemporaryFile() to use a StringIO and add it to an array of file handles. The somewh...

Debugging pyinstaller binary install missing import "ImportError: No module named google.protobuf"

›
We were missing an import in our pyinstaller, the error was: ImportError: No module named google.protobuf There is a simple fix for this...
Thursday, September 17, 2015

Patching a python class attribute in a unit test using mock

›
I often want to change a class attribute in a unit test. While it is sort of documented in the official documentation , it's missing an ...
Friday, September 4, 2015

Snippet for verifying a SHA256 hash of a downloaded file in bash

›
This snippet will download openssl and verify the hash against a hard-coded value. This is useful on old operating systems (specifically Cen...
‹
›
Home
View web version
Powered by Blogger.