Skip to content

Instantly share code, notes, and snippets.

View rkennesson's full-sized avatar
:octocat:
I may be slow to respond.

Richard Kennesson rkennesson

:octocat:
I may be slow to respond.
View GitHub Profile
@rkennesson
rkennesson / install-yubikey-neo-gpg.md
Created November 11, 2015 01:39
How to configure and install a YubiKey NEO with GnuPG

Install YubiKey NEO's GPG Ubuntu 14.04

First of all you need to add the devide to the /etc/libccid_Info.plist file. In order to do so, change the file in this way:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
@rkennesson
rkennesson / gist:c3d20b884b6b265ccf6a
Created November 11, 2015 01:41 — forked from andrewlkho/gist:7373190
How to use authentication subkeys in gpg for SSH public key authentication

GPG subkeys marked with the "authenticate" capability can be used for public key authentication with SSH. This is done using gpg-agent which, using the --enable-ssh-support option, can implement the agent protocol used by SSH.

Requirements

A working gpg2 setup is required. It may be possible to use gpg 1.4 but with gpg-agent compiled from gpg2. If you are using OS X 10.9 (Mavericks) then you may find the instructions [here][1] useful.

@rkennesson
rkennesson / post-receive
Created November 11, 2015 01:41 — forked from andrewlkho/post-receive
Deploying jekyll (on a Joyent Shared Accelerator)

This was originally posted on 2010-12-29 to http://andrewho.co.uk/weblog/deploying-jekyll-on-a-joyent-shared-accelerator

This website is based on [jekyll][] (a static site generator). I store the text files for jekyll in a git repository. Here is how I setup automatic deployment of this website. Whilst a lot of this post is generally applicable, some of it (specifically the installation section) is only of relevance if, like me, you are hosted on a [Joyent][] Shared Accelerator.

Before we get started, just note that the git repository storing my website is a bare one in ~/git/design/andrewho.co.uk.git. I'll assume you're happy creating such

@rkennesson
rkennesson / gist:91ff87614e5f605f5472
Created November 11, 2015 01:42 — forked from andrewlkho/gist:10739728
Deploying jekyll on TextDrive

This was originally posted on 2012-12-13 to http://andrewho.co.uk/weblog/deploying-jekyll-on-textdrive

This post is an update to "[Deploying jekyll (on a Joyent Shared Accelerator)][old-article]".

This website is based on [jekyll][], a static site generator. I host the files for this in a bare git repository on a [TextDrive][] shared server. Here is the procedure I use to automatically deploy the site whenever I push to master. The paths used below will obviously be specific to where I have placed things. I use a bare git repository in ~/git/andrewho.co.uk.git and deploy to

@rkennesson
rkennesson / gist:63fa0ebd7453137029be
Created November 11, 2015 01:42 — forked from andrewlkho/gist:e9a8c996c4bc1df23cd2
How to secure debian with two factor authentication (TOTP/HOTP)

First, install the necesssary packages:

% apt-get install libpam-oath oathtool

Generate a key and write it to /etc/users.oath (NB the key will be in hexadecimal; if you are using Authy you will want to convert it to BASE32):

% KEY=$( head -c 1024 /dev/urandom | openssl sha1 | awk '{ print $2 }' )
% echo "HOTP/T30/6 andrewlkho - ${KEY}" >> /etc/security/users.oath
% chmod 600 /etc/users.oath
@rkennesson
rkennesson / backup-github.sh
Created November 19, 2015 00:44 — forked from rodw/backup-github.sh
A simple script to backup an organization's GitHub repositories, wikis and issues.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
# (if you're backing up a user's repos instead, this should be your GitHub username)
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API)
GHBU_PASSWD=${GHBU_PASSWD-"<CHANGE-ME>"} # the password for that account
GHBU_GITHOST=${GHBU_GITHOST-"github.com"} # the GitHub hostname (see comments)
GHBU_PRUNE_OLD=${GHBU_PRUNE_OLD-true} # when `true`, old backups will be deleted
@rkennesson
rkennesson / setup_dev_osx.sh
Created November 22, 2015 05:15 — forked from jpswade/setup_dev_osx.sh
Mac OS X Development Environment Setup
#!/bin/sh
xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap caskroom/cask
brew install brew-cask
brew install git
brew cask install virtualbox
brew cask install vagrant
brew cask install netbeans-php
brew cask install mysqlworkbench
[Console]::Beep(130, 100)
[Console]::Beep(262, 100)
[Console]::Beep(330, 100)
[Console]::Beep(392, 100)
[Console]::Beep(523, 100)
[Console]::Beep(660, 100)
[Console]::Beep(784, 300)
[Console]::Beep(660, 300)
[Console]::Beep(146, 100)
[Console]::Beep(262, 100)
#!/bin/sh
# Sublime Text 3 install with Package Control (last update: 12 July 2015)
#
# No need to download this script, just run it on your terminal:
#
# $ curl -L git.io/sublimetext | sh
#
# When you need to update Sublime Text, run this script again.
@rkennesson
rkennesson / duplicity
Created November 25, 2015 22:48
duplicity usage
#list files in duplicity backup and search for 'bash' in the list of files.
#the third '/' is required after 'file://'
duplicity list-current-files file:///home/wbronski/Downloads/Backup | grep bash