Instantly share code, notes, and snippets.

Stephan Sokolow ssokolow

View GitHub Profile
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use std::panic::catch_unwind;
/// Variation on `std::time::Duration` that sacrifices a bit of precision on the positive
/// side of the in order to provide a nicely serializable form for `SystemTime` values.
/// (Workaround for
#[derive(Eq, PartialEq, Debug, Serialize, Deserialize)]
pub struct Timestamp {
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""QPlainTextEdit With Inline Spell Check
Original PyQt4 Version:
Copyright 2009 John Schember
Copyright 2018 Stephan Sokolow
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""Generate a printable calendar in PDF format, suitable for embedding
into another document.
Tested with Python 2.7.
- Python
- Reportlab
View 99-rfid-scanner.rules
# Use `udevadm info -a -n /dev/input/whatever` to look up ATTRS{name}
SUBSYSTEM=="input", ATTRS{name}=="HID 04d9:1400", MODE="0666"
View Cargo.toml
name = "unimportant_if_subsumed_by_setuptools"
version = "0.1.0"
authors = ["Your Name Here <>"]
name = "unimportant_if_subsumed_by_setuptools"
crate-type = ["cdylib"]
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""Simple notify2-based apt-get update notifier
- dbus-python (A.K.A. python-dbus)
- notify2
- python-gobject (for Python 2.x)
(Though it shouldn't be too difficult to adapt to Python 3.x since
# A simple helper to automate the process of downloading Windows-only games
# using the Linux version of SteamCMD.
# (This is what happens when I self-nerd-snipe on something despite finding
# it distasteful, like downloading ScummVM resources from Steam because the
# Humble Bundle DRM-free downloads were missing a couple of the games offered
# by the included the Steam key.)
#!/usr/bin/env python
"""Simple wrapper to update Transmission's IPv4 binding on startup for use with VPNs.
(For Linux systems. Tested on Ubuntu 14.04 LTS)
import json, os, subprocess
VPN_IF = "tun0"
TRANSMISSION_CFG = os.path.expanduser('~/.config/transmission/settings.json')
View firefox_migration.rst

Disaster Plans for Firefox XUL Sunset

Public URL:Github Gist
Status: Incomplete
Last Updated:2018-07-07 12:48 EDT

Threat Summary