Skip to content

Instantly share code, notes, and snippets.

@jikamens
jikamens / hirsute-510-kernel.sh
Created Aug 9, 2021
Script to force Ubuntu 21.04 to use kernel version 5.10
View hirsute-510-kernel.sh
#!/bin/bash -e
# You will probably need to adjust this script if you aren't using
# the generic kernel.
to_install=
to_hold=
pd=/tmp/packages.$$
mkdir $pd
View hirsute-unfix-displaylink.sh
View passphrase-generator.pl
#!/usr/bin/env perl
# Memorable, typeable password generator. See https://blog.kamens.us/?p=5969.
#
# By Jonathan Kamens <jik@kamens.us>.
#
# This script is in the public domain. You are welcome to do whatever you want
# with it, though it would be nice if you'd give me credit somehow or at least
# send me email and let me know how you're using it.
#
View do-one-update.sh
#!/usr/bin/bash -e
# Pick the first updatable package that isn't held, and list what was
# updated.
trap "rm /tmp/*.$$" EXIT
cp /var/log/dpkg.log /tmp/dpkg.log.$$
apt-mark showhold | awk -F: '{print $1}' |sort -u > /tmp/held.$$
apt list --upgradable 2>/dev/null | awk -F/ 'NR>1 {print $1}' | sort -u > \
View ubuntu-dpkg-downgrade.sh
#!/bin/bash -e
# This script reads a dpkg.log fragment, identifies all of the
# packages upgraded in it, finds and downloads the pre-upgrade
# versions of those packages from Launchpad, and installs them,
# downgrading the system to approximately the state it was in before
# the packages were upgraded.
#
# To use it, copy the section of /var/log/dpkg.log containing the
# upgrade you want to undo into a new file, remove the lines
View hirsute-fix-displaylink.sh
View keybase.md

Keybase proof

I hereby claim:

  • I am jikamens on github.
  • I am jik (https://keybase.io/jik) on keybase.
  • I have a public key ASD44yzUyutb2s-C6BGHSYGt0BAQ5mglTt9Si89y3HE4PQo

To claim this, I am signing this object:

@jikamens
jikamens / auto-dnsbl.pl
Last active Apr 9, 2017
auto-dnsbl.py - add DNSBL entries to /etc/hosts.deny automatically
View auto-dnsbl.pl
#!/usr/bin/env perl
=pod
=head1 SUMMARY
auto-dnsbl.py - add DNSBL entries to /etc/hosts.deny automatically
=head1 DESCRIPTION
@jikamens
jikamens / download-helpscout-mailbox.py
Last active Oct 27, 2021
Python script for doanloding conversations, customers, and attachments from a Help Scout mailbox
View download-helpscout-mailbox.py
#!/usr/bin/env python
"""Download conversations, customers, and attachments from a Help Scout mailbox
Written by Jonathan Kamens (jik@kamens.us).
Released into the public domain.
Email me patches if you have enhancements you'd like me to incorporate. Don't
bother emailing me bug reports or suggestions; this script does exactly what I
View gist:c2416d4d08df6037a9e0
Verifying I am +jik on my passcard. https://onename.com/jik