Skip to content

Instantly share code, notes, and snippets.

View oisin's full-sized avatar
💭
Thing.

Oisín Hurley oisin

💭
Thing.
View GitHub Profile
@oisin
oisin / IKEA
Last active December 17, 2015 02:19
Here is my IKEA experience this evening:
I have an existing IKEA Family card.
I was creating a shopping list that I wanted to save, so I created an online IKEA
account (using the email [not listed in gist]).
I looked for a way to associate my existing card with my new online account - there
was no visible way to do this. There is no online help to indicate if this action is
possible or not.
@oisin
oisin / gist:5976561
Created July 11, 2013 15:38
Collection of git things which can be useful.
  • Show all th etags and their dates since a time

git log --date-order --graph --tags --simplify-by-decoration --pretty=format:'%ai %h %d' --after={2013-06-01}

#!/bin/bash
PROGNAME=${0##*/}
INPUT=''
QUIET='0'
NOSTATS='0'
max_input_size=0
max_output_size=0
usage()
@oisin
oisin / gist:6328241
Created August 24, 2013 13:49
Building Erlang from source on OS X 10.9 - don't forget SSL
# Get the 1.0.1 version of SSL
brew install openssl
./configure --disable-hipe --enable-smp-support --enable-threads --enable-kernel-poll --enable-darwin-64bit --with-ssl=/usr/local/opt/openssl
touch lib/wx/SKIP lib/odbc/SKIP
make -j4
sudo make install
@oisin
oisin / Gemfile
Created September 10, 2013 09:12
Simple AMQP clients using Bunny and CloudAMQP
source 'https://rubygems.org'
gem 'bunny'
gem 'json'
@oisin
oisin / gist:6562181
Created September 14, 2013 13:46
Override Postgres defaults when you have installed the Postgres.app application on OS X, and you need to compile native extensions for a Ruby gem with bundler.
gem install do_postgres -- --with-pgsql-server-dir=/Applications/Postgres.app/Contents/MacOS --with-pgsql-server-include=/Applications/Postgres.app/Contents/MacOS/include/server
@oisin
oisin / AWS S3 Log Regex
Created September 14, 2013 15:59
Ruby regex for targetting AWS S3 logs for the Verbose podcast
/.* verbose-ireland \[(.*)\] (\d+.\d+.\d+.\d+) .* REST.GET.OBJECT \d+_TheVerbosePodcast_-_Episode(\d+).mp3 .* - (\d+) (\d+) (\d+) (\d+) "(.*)" "(.*)".*/
@oisin
oisin / allbranches.sh
Created September 25, 2013 13:00
Track all the branches on the remote, locally. Useful for when you are moving a repo from one remote to another.
#!/bin/bash
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do
git branch --track ${branch##*/} $branch
done
@oisin
oisin / pr.md
Created October 15, 2013 08:50 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

// Android apps include Converser initialization and subscription
// as part of an activity. In the code snippet below, it shows useful
// places to put the code so that it is initialised and subscribes at
// the right time.
public class YourActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
// When this activity is created, initialize Converser with the correct key and endpoint
// this doesn't actually connect to the server, it just sets it up ready to go for the