Skip to content

Instantly share code, notes, and snippets.

View KenMacD's full-sized avatar

Kenny MacDermid KenMacD

  • Halifax, Nova Scotia, Canada
View GitHub Profile
KenMacD / cluster.yaml
Created September 13, 2023 14:28
Kind cluster with podman
kind: Cluster
# If ipv4 only:
# ipFamily: ipv4
- |
kind: InitConfiguration
KenMacD / resolve_tco_links.user.js
Created July 5, 2022 14:47 — forked from jix/resolve_tco_links.user.js
User script to resolve links on twitter
KenMacD / main.cpp
Created May 10, 2019 02:42 Callback Variable Testing
#include <Particle.h>
static char* var_str = (char *)"ORIG STR";
static int var_int = 1;
static double var_double = 1.23;
static double override_double;
static const void* static_str_test(const char* name, Spark_Data_TypeDef type,
const void* var, void *reserverd) {
KenMacD /
Last active October 21, 2015 15:22
How to set a new crypto key on your My Passport drive in Linux.

###Disclaimer: All risk is your own. In the best case this will erase everything on the disk forever.


  • Make sure you want to wipe the drive.
  • Check that the sg_raw command works.
  • You'll likely have to run these as root or with sudo.
  • This should be done on a ramdisk to key data is left behind.
  • WD drive must be plugged in, and you must know the scsi device (check dmsg)
KenMacD /
Created May 19, 2014 18:30
Keybase proof

Keybase proof

I hereby claim:

  • I am kenmacd on github.
  • I am kenmacd ( on keybase.
  • I have a public key whose fingerprint is CC7C 9BE4 F442 A854 E29D F256 9598 1B9F E3FB 7465

To claim this, I am signing this object:

KenMacD /
Created September 4, 2013 01:36
Mega download script from Download with "./ '<URL>' <file name>" (Note the single quotes around the URL, otherwise bash complains "event not found")
id=`echo $url | awk -F '!' '{print $2}'`
key=`echo $url | awk -F '!' '{print $3}' | sed -e 's/-/+/g' -e 's/_/\//g' -e 's/,//g'`
b64_hex_key=`echo -n $key | base64 --decode --ignore-garbage 2> /dev/null | xxd -p | tr -d '\n'`
key[0]=$(( 0x${b64_hex_key:00:16} ^ 0x${b64_hex_key:32:16} ))
KenMacD /
Last active December 15, 2020 15:23
Kali Sources
cat >/etc/apt/sources.list.d/kali.list <<EOF
deb kali main contrib non-free
deb-src kali main contrib non-free
deb kali/updates main contrib non-free
deb-src kali/updates main contrib non-free
sudo apt-key adv --keyserver --recv-keys ED444FF07D8D0BF6
sudo apt-get update
KenMacD /
Created October 9, 2012 19:00
Convert SARVAM image to binary
#!/usr/bin/env python
import Image
from sys import stdin, stdout
from StringIO import StringIO
for value in list(
KenMacD /
Created October 7, 2011 02:41
GPG Offline Master Key