Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am adamwhittingham on github.
  • I am adamwhittingham (https://keybase.io/adamwhittingham) on keybase.
  • I have a public key ASCjyYUeclgkZ_rp1CXfIfqJicoJkweEyKObtA1Iy0EIfgo

To claim this, I am signing this object:

<?xml version="1.0" encoding="UTF-8" ?>
<Root>
<KeyboardLayout>en-GB</KeyboardLayout>
<MouseXMode Value="" />
<MouseXDecay Value="0" />
<MouseYMode Value="" />
<MouseYDecay Value="0" />
<MouseReset>
<Primary Device="{NoDevice}" Key="" />
<Secondary Device="{NoDevice}" Key="" />
@AdamWhittingham
AdamWhittingham / gist:ebe7de6981685ae1d3bb
Created December 17, 2015 17:38
Recover Ubuntu inode exhaustion when apt-get broken
When inodes run out, Ubuntu can fail to install the latest kernel but can still have a dependency on it (via a pacakage like `kernel-generic`)
This leads to an error message when trying to run any `apt-get` commands about a missing dependency requiring you to run `apt-get -f install` with no args to grab the missing dep.
Doing this will fail though, as there are no inodes left...
To resolve this, you can artificially drop the number of inodes by zipping up files.
A great candidate for this is the old kernals in `/usr/src`.
1. Check the current running kernal version with `uname -r`
2. Select a couple of kernal versions in `/usr/src` which do *NOT* have the same version number as the running one, nor are the most recent.
@AdamWhittingham
AdamWhittingham / gist:d5863d30d2ac492840d1
Created March 16, 2015 23:37
Ubuntu Hubot Upstart Config
# hubot
description "Hubot Slack bot"
author "Adam Whittingham <emailaddress>"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
# Path to Hubot installation
env HUBOT_DIR='/opt/hubot/kaytoo/'
### Keybase proof
I hereby claim:
* I am adamwhittingham on github.
* I am adamwhittingham (https://keybase.io/adamwhittingham) on keybase.
* I have a public key whose fingerprint is F0EB AC07 E327 50FC DF11 D0FB 4919 6876 6597 A1AF
To claim this, I am signing this object:
@AdamWhittingham
AdamWhittingham / Gemfile
Last active August 29, 2015 14:03
Adam's Neat Default Rails Gemfile
source 'https://rubygems.org'
gem 'rails', '~> 4.2'
gem 'pg'
gem 'foreigner'
gem 'coffee-rails'
gem 'jbuilder'
gem 'jquery-rails'
@AdamWhittingham
AdamWhittingham / etc_init.d_teamspeak3
Created January 11, 2014 01:34
Teamspeak 3 init.d script
#!/bin/bash
#
# chkconfig: 2345 98 8
# description: start/stop/status the Teamspeak3 server
# On Ubuntu:
# - copy to `/etc/init.d/teamspeak3`
# - `sudo chmod +x /etc/init.d/teamspeak3`
# - `update-rc.d teamspeak3 defaults