Skip to content

Instantly share code, notes, and snippets.

View n8henrie's full-sized avatar

Nathan Henrie n8henrie

View GitHub Profile
@n8henrie
n8henrie / 2017-09-07-raspbian-stretch.txt
Created September 17, 2017 13:54
Default packages on fresh image of Raspbian Stretch 2017-09-07 SHA-256: a64d742bc525b548f0435581fac5876b50a4e9ba1d1cd6433358b4ab6c7a770b
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 adduser 3.115 all add and remove users and groups
ii adwaita-icon-theme 3.22.0-1+deb9u1 all default icon theme of GNOME
ii alacarte 3.11.91-2+rpi5 all easy GNOME menu editing tool
ii alsa-base 1.0.27+1 all dummy package to ease purging of obsolete conffiles
ii alsa-utils 1.1.3-1
@n8henrie
n8henrie / 2017-09-07-raspbian-stretch-lite.txt
Created September 17, 2017 13:52
Default packages on fresh image of Raspbian Stretch Lite 2017-09-07 SHA-256: bd2c04b94154c9804cc1f3069d15e984c927b750056dd86b9d86a0ad4be97f12
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 adduser 3.115 all add and remove users and groups
ii alsa-utils 1.1.3-1 armhf Utilities for configuring and using ALSA
ii apt 1.4.7 armhf commandline package manager
ii apt-listchanges 3.10 all package change history notification tool
ii apt-transport-https 1.4.7 armhf https download transport for APT
@n8henrie
n8henrie / Average Internet Speed.ipynb
Last active March 28, 2019 18:47
My average internet speed over the last year or so
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@n8henrie
n8henrie / whois.py
Last active April 2, 2020 07:18
Python transliteration of whois tool, taken from http://code.activestate.com/recipes/577364-whois-client/
"""
Whois client for python
https://gist.github.com/n8henrie/dc55b8fb366710003b5d3c557dfc4469
transliteration of:
http://www.opensource.apple.com/source/adv_cmds/adv_cmds-138.1/whois/whois.c
The MIT License (MIT)
@n8henrie
n8henrie / dateformat.py
Created May 18, 2017 13:49
Format free text date in yyyymmdd format
"""dateformat.py :: Format free text date in yyyymmdd format."""
@n8henrie
n8henrie / newpost.py
Last active March 14, 2017 17:54
Create a new draft for n8henrie.com
"""newpost.py :: Create a new draft for n8henrie.com
Args:
--drafts-dir: Path to drafts directory
"""
import datetime
import argparse
@n8henrie
n8henrie / notifier.pl
Created December 11, 2016 04:18
irssi script to notify via Notification Center if I'm mentioned by nickname or receive a DM
# Script for irssi to trigger macOs Notification Center
# Nathan Henrie (modifications, ©2016)
# Inspired by https://github.com/paddykontschak/irssi-notifier/blob/master/notifier.pl
#
# Currently notifies if mentioned by nickname or if PMed
# Only sends a static message to avoid arbitrary command execution by `system`
#
## Installation:
# Copy to `~/.irssi/scripts/` (and symlink to `~/.irssi/scripts/autorun` if desired)
@n8henrie
n8henrie / time_stuff.py
Last active November 22, 2016 18:38
Gist of simple timing comparisons in Python
"""time_stuff.py :: A bunch of `timeit` comparisons for different snippets.
The module just loads the tests, so you can run specific examples interactively
if desired:
$ python3 -i <(curl -s https://gist.githubusercontent.com/n8henrie/db6880e2c84df153c5ae19d5dba16757/raw)
>>> find_vs_split_vs_re()
Best of 10000 runs over 5 repeats
test_find: 0.0087874069577083
test_split: 0.013382209988776594
@n8henrie
n8henrie / ScratchpadMe.applescript
Last active November 14, 2016 16:47
Quicksilver Action to add Quicksilver contents to my "scratchpad" with a timestamp
property test_str : "This is a test note."
on process_text(str)
set time_str to current date
try
tell application "Notes"
-- log (get properties of first note)
set scratchpad to first note whose name is "#scratchpad #scratchpad"
set notebody to body of scratchpad
// Downloads all Project Euler problems into directory `outdir`
// With queue of 10 runs in about 43 seconds for 582 problems
// Python asyncio solution was about 42 secs
package main
import (
"bytes"
"fmt"
"log"