Skip to content

Instantly share code, notes, and snippets.

View pcolby's full-sized avatar

Paul Colby pcolby

View GitHub Profile
@pcolby
pcolby / resume.json
Last active December 27, 2023 03:01
{
"basics": {
"name": "Paul Colby",
"label": "Technology Leader",
"email": "[email protected]",
"phone": "+61 417 717 669",
"summary": "With more than 20 years experience in software engineering and technical leadership, I've worked successfully at all levels of software delivery, from bare metal software engineering, to architecting large-scale high-throughput low-latency cloud-based systems; building and leading high-performance teams, to complete management of a SaaS startup's IT.\n\nIn all that I do, I strive to deliver quality solutions, with a strong sense of ownership. I value open and transparent communication, with genuine care for the both the business and the people I work with.",
"profiles": [
{
"network": "GitHub",

Fresh [L]Ubuntu

Just some notes on things I like (or need) to do to make a fresh Ubuntu (or Lubuntu) install usable ;)

Basics

sudo apt install arandr build-essential colordiff curl fonts-noto-color-emoji \
  gawk gpa hunspell-en-au jq keepassxc lcov solaar ssh
--- /usr/local/lib/python2.7/dist-packages/awslogs/core.py.backup 2017-05-25 06:51:39.360136000 +1000
+++ /usr/local/lib/python2.7/dist-packages/awslogs/core.py 2018-02-07 10:11:08.695686691 +1100
@@ -18,8 +18,10 @@
def milis2iso(milis):
- res = datetime.utcfromtimestamp(milis/1000.0).isoformat()
- return (res + ".000")[:23] + 'Z'
+ #res = datetime.utcfromtimestamp(milis/1000.0).isoformat()
+ #return (res + ".000")[:23] + 'Z'
@pcolby
pcolby / cpp-style.md
Last active January 2, 2020 01:20
cpp-style
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!--
<match>
<test name="family"><string>sans-serif</string></test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Color Emoji</string>
</edit>
</match>
@pcolby
pcolby / rip-dvd-iso.sh
Created January 10, 2018 10:35
A simple way to copy a DVD ISO using dd
#!/bin/bash
DEVICE=/dev/cdrom
DD=`which dd` || { echo 'Required command not found: dd' >&2; exit 1; }
ISOINFO=`which isoinfo` || { echo 'Required command not found: isoinfo' >&2; exit 1; }
SED=`which sed` || { echo 'Required command not found: sed' >&2; exit 1; }
LABEL=`"$ISOINFO" -d -i "$DEVICE" | "$SED" -nre 's/^Volume id: //p'`
BLOCK_SIZE=`"$ISOINFO" -d -i "$DEVICE" | "$SED" -nre 's/^Logical block size is: //p'`
sudo sed -re 's/.*((\w{5}-){4}\w{5}).*/\1\n/' /sys/firmware/acpi/tables/MSDM
#!/bin/bash
COLLECTIONS_DIR=~/.kodi/addons/screensaver.video/resources/collections
VIDEOS_DIR=~/.kodi/userdata/addon_data/screensaver.video/videos
while IFS= read -d '' -r COLLECTION; do
echo "$COLLECTION"
VIDEOS=`awk 'BEGIN{FS="[<>]";OFS="|"}{if($2=="filename")FILENAME=$3;if($2=="primary")print FILENAME,$3}' "$COLLECTION"`
for VIDEO in ${VIDEOS[@]}; do
FILENAME=`echo "$VIDEO" | cut -d'|' -f1`
@pcolby
pcolby / PrintableVariant.cpp
Created July 1, 2015 06:01
A printable variant for QtTest
// Usage: QCOMPARE(PrintableVariant(v1), PrintableVariant(v2));
// Note, QTest will still limit output to 1024 chars in QTestResult::compare
class PrintableVariant : public QVariant {
public: PrintableVariant(const QVariant &other) : QVariant(other) { }
};
namespace QTest {
template<> char *toString(const PrintableVariant &variant){
QString string;