Skip to content

Instantly share code, notes, and snippets.

View Arch linux minikube kvm2 setup
# Install these packages (use your favorite AUR tool here)
yay -S minikube kubectl docker-machine-driver-kvm2 libvirt qemu-headless ebtables
# Get libvirt going
sudo systemctl enable libvirtd.service
sudo usermod -a -G libvirt $(whoami)
# This fix thanks to
sudo virsh net-autostart default
grugnog / trellovotecount
Created Sep 24, 2018
Count votes in Trello by person
View trellovotecount
#!/usr/bin/env bash
if [ -z "$TRELLO_API_KEY" -o -z "$TRELLO_API_TOKEN" ]; then
echo "Go to and export TRELLO_API_KEY and TRELLO_API_TOKEN"
exit 1
for id in $(curl -s "$TRELLO_API_KEY&token=$TRELLO_API_TOKEN&limit=1000" | jq -r '.[] | .id'); do
curl -s "$id/membersVoted?key=$TRELLO_API_KEY&token=$TRELLO_API_TOKEN" | jq '.[] | .fullName'
sleep 0.5
done | sort | uniq -c | sort -n
grugnog / c2md.xsl
Created Nov 7, 2017
Converts Confluence multi-page XML export into a Markdown Git repository retaining most formatting, links and version history
View c2md.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
Original sources/credit:
grugnog / jira2md.xsl
Last active Sep 8, 2017
Stylesheet to convert a JIRA report list exported as XML into basic markdown, including all non-empty fields.
View jira2md.xsl
<?xml version="1.0" encoding="UTF-8"?>
Stylesheet to convert a JIRA report list exported as XML into
basic markdown, including all non-empty fields.
To run: saxon-xslt -xsl:jira2md.xsl jira-export.xml
<xsl:stylesheet xmlns:xsl="" xmlns:atom="" xmlns:functx="" xmlns:fn="" xmlns:xs="" version="3.0">
<xsl:output omit-xml-declaration="yes" method="text" indent="no"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
grugnog / sussh
Last active Nov 5, 2020
Simple expect script to get an interactive root shell using a password from the Lastpass "lpass" tool. Assumes a ssh public key authentication. This allows usage of long, secure passwords to sudo whilst avoiding copy-paste (risky) and passing credentials as command line options (insecure).
View sussh
set timeout 600
set lpass [lindex $argv 0]
set arguments [lrange $argv 1 end]
if {$lpass eq "" || $arguments eq ""} {
puts "sussh: Login to interactive root shell using sudo password from lpass."
puts "The credential is sent via expect, not via any command line option.\n"
puts "Usage: sussh <lpass-key> <ssh-args ...>"
puts " lpass-key: Suffix of a lpass record with the prefix 'ssh-'"
puts " ssh-args: username, hostname, port, alias or other ssh options\n"
grugnog /
Created Apr 3, 2012
CiviCRM Drush refactoring
| CiviCRM version 4.1 |
| Copyright CiviCRM LLC (c) 2004-2011 |
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
You can’t perform that action at this time.