Skip to content

Instantly share code, notes, and snippets.

# /etc/netplan/00-installer-config.yaml
## Comment out everything in here so that eth0 isn't configured
## Trap for young players - this generates a systemd network config in /run which overrides the one in /etc that you created above and it will take you hours to work that out
# This is the network config written by 'subiquity'
#network:
# ethernets:
# eth0:
# dhcp4: true
# dhcp6: true
@johnf
johnf / Telstra traceroute
Created May 14, 2018 08:34
Telstra and HE.NET routing
# https://www.telstra.net/cgi-bin/trace
1 gigabitethernet3-3.exi1.melbourne.telstra.net (203.50.77.49) 0.350 ms 0.284 ms 0.244 ms
2 bundle-ether3-100.exi-core10.melbourne.telstra.net (203.50.80.1) 1.618 ms 1.424 ms 2.244 ms
3 bundle-ether12.chw-core10.sydney.telstra.net (203.50.11.124) 13.989 ms 14.167 ms 15.237 ms
4 bundle-ether1.oxf-gw11.sydney.telstra.net (203.50.6.93) 14.864 ms 14.416 ms 14.988 ms
5 bundle-ether1.sydo-core03.sydney.reach.com (203.50.13.98) 15.610 ms 14.542 ms 14.861 ms
6 unknown.telstraglobal.net (202.84.247.45) 200.516 ms 201.549 ms 202.132 ms
7 i-0-5-0-22.paix02.bi.telstraglobal.net (202.84.247.41) 200.123 ms 200.183 ms 200.629 ms
8 he-peer.paix02.pr.telstraglobal.net (134.159.61.22) 199.884 ms 199.689 ms 199.748 ms
9 10ge4-1.core1.sjc1.he.net (72.52.92.114) 207.246 ms 201.521 ms 200.250 ms
@johnf
johnf / foo.sh
Created November 2, 2017 04:09
Remove merged branchs
function rmb {
current_branch=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
if [ "$current_branch" != "master" ]; then
echo "WARNING: You are on branch $current_branch, NOT master."
fi
echo "Fetching merged branches..."
@johnf
johnf / gist:7228007
Created October 30, 2013 06:31
Simple jabber server
// Based on code at https://github.com/astro/node-xmpp/blob/master/examples/c2s.js
var xmpp = require('node-xmpp');
var c2s = new xmpp.C2SServer({
port: 5222,
domain: 'localhost'
});
var sessions = {};
@johnf
johnf / download.sh
Created December 24, 2015 00:56
Extract Apple Firmware
#!/bin/bash
set -e
orig_dir=$(pwd)
dir=`mktemp -d` && cd $dir
# Grab Partial Zip
git clone git@github.com:planetbeing/partial-zip.git
require 'thin/version'
module Thin
def self.win? # Are we runing windows
true
end
end
@johnf
johnf / gist:5301582
Created April 3, 2013 14:15
Withdraw all LinkedIn Invitations
#!/usr/bin/env ruby
# Go through linked in invitations and withdraw them all
#
# Usage
#
# First collect the inviites
# ./uninvite collect email@example.com password > data.csv
#
# Then clean up the CSV in your favourite editor
bp@bp-dvmh-mail-01:/tmp/linux-2.6.32/debian.master/config/amd64$ diff -u config.flavour.generic config.flavour.server
--- config.flavour.generic 2013-03-14 16:31:58.000000000 +1100
+++ config.flavour.server 2013-03-14 16:31:58.000000000 +1100
@@ -1,21 +1,21 @@
#
-# Config options for config.flavour.generic automatically generated by splitconfig.pl
+# Config options for config.flavour.server automatically generated by splitconfig.pl
#
-CONFIG_DEFAULT_CFQ=y
-# CONFIG_DEFAULT_DEADLINE is not set
def moo
puts blah if foo
end
@johnf
johnf / A
Created September 4, 2012 08:38
snmp:extend { 'nslookup remotely':
oid => '1.1.1.1',
package => 'nslookup'
}