Skip to content

Instantly share code, notes, and snippets.

View andrewspiers's full-sized avatar

Andrew Spiers andrewspiers

  • Melbourne, Australia
View GitHub Profile
@andrewspiers
andrewspiers / rst2html.css
Created January 3, 2018 02:55 — forked from vergissberlin/rst2html.css
Documentation: Create GitHub like styled html doc file with rst2html
/**
* :Author: Chad Skeeters
* :Contact: cskeeters@nciinc.com
* Stylesheet for use with Docutils/rst2html.
* Example: rst2html --stylesheet=rst2html.css README.rst doc/html/README.html
*/
html {
font-size: 100%;
-webkit-text-size-adjust: 100%;
@andrewspiers
andrewspiers / GNUPG Cheatsheet.md
Created September 28, 2017 00:38 — forked from turingbirds/GNUPG Cheatsheet.md
GPG (GNUPG) Cheatsheet

GNUPG CHEATSHEET

Setting up: key generation

This generates a public/private keypair.

$ gpg --gen-key

$ gpg --list-secret-keys

@andrewspiers
andrewspiers / Docker Daemon hangs
Last active March 3, 2017 06:11
Docker socket unresponsive - goroutine-stacks
$ docker info
Containers: 16
Running: 0
Paused: 0
Stopped: 16
Images: 130
Server Version: 1.13.1
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
@andrewspiers
andrewspiers / howto-apply-fix-to-multiple-branches.rst
Created January 19, 2016 00:57
Applying patches to branches

if i have a fix that applies to multple branches say 4.1 4.2 and 4.5 branch, would this be the best way to apply the bug fix to branches...

[11:37] - clone dev branch git clone git@example.com:/project -b devrelease devfolder git add setup/example.sql git commit -m "Fixed the example bug" git push origin master note down the sha1 code number
#!/usr/bin/env python
# image_test.py
import subprocess
import sys
"""
USAGE: ssh user@guest python < image_test.py
@andrewspiers
andrewspiers / ssh-keyscan-fingerprint
Created January 12, 2015 00:01
function to get the fingerprints of remote servers
function ssh-keyscan-fingerprint {
#function to get the fingerprints of remote servers
orig_umask=$(umask)
umask 0077
t=$(mktemp)
chmod 0700 ${t}
while [ ! -z $1 ] ; do
#!/usr/bin/env python3
import logging
import logging.handlers
import sys
import tempfile
logger = logging.getLogger()
handler = logging.handlers.SysLogHandler(address=('/dev/log'))
logger.addHandler(handler)
@andrewspiers
andrewspiers / libvirt-console.rst
Last active August 29, 2015 14:05
libvirt console

libvirt consoles

Getting a text console on linux guests

Check the xml of the guest has correct entries, something like this:

<serial type='pty'>