Skip to content

Instantly share code, notes, and snippets.

View lparkes's full-sized avatar

Lloyd Parkes lparkes

  • Wellington, New Zealand
View GitHub Profile
@lparkes
lparkes / nginx.diff
Created April 9, 2023 23:57
Add gssapi option to pkgsrc package www/nginx
diff -r bdf3299da6b4 www/nginx/distinfo
--- a/www/nginx/distinfo Wed Apr 05 15:46:59 2023 +0000
+++ b/www/nginx/distinfo Mon Apr 10 11:56:10 2023 +1200
@@ -51,6 +51,9 @@
BLAKE2s (set-misc-nginx-module-0.33.tar.gz) = 306eb7a96ce5650c7e97a91e9cdba48d154d10cf6445d31193ffab889054d893
SHA512 (set-misc-nginx-module-0.33.tar.gz) = 1ff4c947538a5bd5f9d6adcd87b37f2702f5cc90e3342bc08359cbe8f290b705a3a2daa3dedfb1df3ce4bc19478c8fcac07081c4a53a804fc2862d50078278dc
Size (set-misc-nginx-module-0.33.tar.gz) = 30084 bytes
+BLAKE2s (spnego-http-auth-nginx-module-1.1.1.tar.gz) = d0d31e1219a7b7c99f08ceeffb5fd29aaa2c3cbfd2ffbbdf402c1b5770622193
+SHA512 (spnego-http-auth-nginx-module-1.1.1.tar.gz) = 913ca76154f379b7e472962f522c7bf1565d3b009f77c9a6a37b4fe344642593c64ab3acd134160dddacd15765639de5c319fda14de617db2bca9c7929d02641
+Size (spnego-http-auth-nginx-module-1.1.1.tar.gz) = 18507 bytes
@lparkes
lparkes / entropy.diff
Created March 2, 2023 19:42
Enhancement to NetBSD /etc/rc.d/entropy
diff -r 093934994b6c etc/rc.d/entropy
--- a/etc/rc.d/entropy Wed Feb 08 18:28:10 2023 +0000
+++ b/etc/rc.d/entropy Fri Mar 03 08:39:40 2023 +1300
@@ -16,7 +16,11 @@
entropy_start()
{
case ${entropy-} in
- '') ;;
+ '') if [ $(sysctl -n kern.entropy.needed) -gt 0 ]
+ then
@lparkes
lparkes / owtemp-module.diff
Last active October 10, 2023 18:46
A patch to modularise the owtemp driver
diff -r f342fcb013e6 distrib/sets/lists/modules/mi
--- a/distrib/sets/lists/modules/mi Fri Nov 18 16:01:00 2022 +0000
+++ b/distrib/sets/lists/modules/mi Mon Nov 21 09:05:12 2022 +1300
@@ -361,6 +361,8 @@
./@MODULEDIR@/opencrypto/opencrypto.kmod modules-base-kernel kmod
./@MODULEDIR@/overlay modules-base-kernel kmod
./@MODULEDIR@/overlay/overlay.kmod modules-base-kernel kmod
+./@MODULEDIR@/owtemp modules-base-kernel kmod
+./@MODULEDIR@/owtemp/owtemp.kmod modules-base-kernel kmod
./@MODULEDIR@/pad modules-base-kernel kmod
#!/bin/sh
# This script acquires a temporary AWS session token for you.
# This is useful for two reasons:
# 1) It means you don't get pestered for an MFA token every time you
# run an AWS CLI command.
# 2) It means you can run batch programs that can't request an MFA
# token, but which access AWS resources protected by mandatory
# MFA policies. The session token is generated from an MFA token,
# and so it complies with the mandatory MFA policies. Terraform
_path() {
case ":$PATH:" in
(*":$1:"*) ;;
(*) PATH="$1:$PATH" ;;
esac
export PATH
}
path() {
test x/ = "x$1" && set -- ""
@lparkes
lparkes / 50-mhc-add-mlnx.sh
Created July 20, 2019 21:05
MAAS script to add support for Mellanox adapters
#!/bin/sh
set -e
. /etc/lsb-release
package=MLNX_OFED_LINUX-4.6-1.0.1.1-ubuntu${DISTRIB_RELEASE}-x86_64
wget -q http://www.must-have-coffee.gen.nz/lloyd/${package}.tgz
tar xf ${package}.tgz
@lparkes
lparkes / satellite-tools.yaml
Created July 11, 2019 21:57
Update Satellite Tools past the python2-qpid-proton -> python-qpid-proton rename
# The package python2-qpid-proton in EPEL has been replaced by python-qpid-proton
# in Satellite Tools. There is no obsoletes information though, so yum will never
# know what to do.
#
# Instead we delete python2-qpid-proton and then install the latest versions of
# the packages that we actually want.
- hosts: satellite_rhel7
gather_facts: now
become: yes
@lparkes
lparkes / xterm.xrdb
Last active August 31, 2018 23:39
Use the right mouse button for pasting in xterm
XTerm.VT100.translations: #override \
~Ctrl ~Meta <Btn3Up>:insert-selection(SELECT, CUT_BUFFER0) \n\
~Ctrl ~Meta <Btn3Down>:ignore()