Skip to content

Instantly share code, notes, and snippets.

View adonaldson's full-sized avatar

Andrew Donaldson adonaldson

View GitHub Profile
After a discussion on the future of CodeCumbria. Originally intended to be a call to action to get
more stewards, it turned into a discussion on what people want Code Cumbria to be.
What is Code Cumbria for: "Community, to learn stuff, to be visible and grow a scene" - it was
noticed that of all the people that could attend, those that do are predominantly the remote
workers and the young (highlighting the importance of social for the group)
Focus on topics, not talks. Rather than dredging up talks each month, we want people to "introduce
topics", be it a 30s intro or a 15min presentation. Creating talks is proving too difficult.
@adonaldson
adonaldson / gist:0ed170a688e339db4666
Created October 9, 2015 08:33
My first ever ruby script - start of a long journey!
#
# Add Virtualhost v0.1 - 13/02/2004
#
# by Andrew Donaldson - [email protected]
#
# Performs three functions
# i) Adds entry to HOSTS file
# ii) Adds entry to httpd.conf
# iii) Restarts apache service
@adonaldson
adonaldson / lighthouse_linker.coffee
Created September 10, 2014 08:54
Lighthouse ticket linker script for hubot
# Description:
# Turning mentions of tickets (#(\d+)) into Lighthouse URLs, with info
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:

Keybase proof

I hereby claim:

  • I am adonaldson on github.
  • I am ad (https://keybase.io/ad) on keybase.
  • I have a public key whose fingerprint is 7AF3 8C66 99E1 A514 58DB 2936 BB24 B5C4 563D F050

To claim this, I am signing this object:

Steam through Wine stopped working for me yesterday. After starting up it would just quit.
According to http://bugs.winehq.org/show_bug.cgi?id=35030 it's fixed in 1.7.8. Sadly the latest version on homebrew at the current time is 1.7.7. Let's fix it!
`brew edit wine`
Update the 'devel' section:
```
devel do
@adonaldson
adonaldson / rails_versions.rb
Last active December 30, 2015 11:29
Quick, ugly script to grep rails projects for rails versions, as suggested by @Govan - https://twitter.com/gavinmontague/status/408252762330517506
#!/usr/bin/env ruby
TERMINAL_RED = 31
TERMINAL_GREEN = 32
TERMINAL_DEFAULT = 0
LATEST_RAILS_VERSIONS = {
'2.3' => '2.3.18',
'3.0' => '3.0.20',
'3.1' => '3.1.12',
'3.2' => '3.2.16',
@adonaldson
adonaldson / users_helper.rb
Created January 26, 2013 07:55
Example of a gravatar helper method for Rails (3)
# Assumes two things
# i) Your user class's to_s method outputs something useful - perhaps their name or email address
# ii) Your user class has an 'email' attribute
#
# This will work with any ruby class, it doesn't have to be an activerecord model
#
# usage: gravatar_tag(my_user, size: '32x32', alt: 'This is the alt text', title: 'Any other options get passed into image_tag')
module UsersHelper
@adonaldson
adonaldson / gist:4014472
Created November 5, 2012 00:06
MMO thoughts
What do I remember being so good about MMOs?
Identifiers that say something about me (Race chosen, name, class, abilities, weapons, armour, appearance)
A 'home' - somewhere to idle after questing. Somewhere where it's likely to bump into friends, or other people I 'know' / recognise.
Meet people who are different but with shared goals.
"Group of friends that I met in game. Similar situations, complementing skills, similar attitudes, etc. Usually introduced by someone helping someone else out."
World effects (e.g. Weather) - something that happens on a regional scale that is noticeable by everyone nearby
@adonaldson
adonaldson / hsbc.rb
Created September 17, 2012 13:14 — forked from lukeredpath/hsbc.rb
Automated HSBC business banking statement downloads (TODO: Update to work with Personal accounts)
require 'rubygems'
require 'mechanize'
require 'keychain'
class Scraper
def initialize(url)
@url = url
@flows = []
end