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 / pr.md
Created May 27, 2014 12:30 — 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:

@oisin
oisin / gist:987247
Created May 23, 2011 18:34 — forked from leereilly/gist:987094
API version checking using Sinatra's before filter; supports nested resources
require 'sinatra'
# Set the version of the API being run here
#
MAJOR_VERSION = 1
MINOR_VERSION = 0
VERSION_REGEX = %r{/api/v(\d)\.(\d)}
helpers do
def version_compatible?(nums)
@oisin
oisin / attach_snapshot_volumes.sh
Created January 20, 2012 15:34
Scripts to create/attach/snapshot multiple EBS volumes
(i=0; for vol in $(awk '{print $2}' vol_snaps.txt); do i=$((i+1)); ec2-attach-volume $vol -i i-aa3bc4c8 -d /dev/sdv${i}; done)
@oisin
oisin / gist:4444722
Last active December 10, 2015 13:59 — forked from bdougherty/gist:125113
get_git_branch() {
git branch | awk '/^\*/ { print $2 }'
}
get_git_dirty() {
git diff --quiet || echo '*'
}
get_git_prompt() {
git branch &> /dev/null || return 1
#!/bin/bash
PROGNAME=${0##*/}
INPUT=''
QUIET='0'
NOSTATS='0'
max_input_size=0
max_output_size=0
usage()
@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:

@oisin
oisin / WIN10.MD
Created April 27, 2022 20:07 — forked from hungneox/WIN10.MD
How Make a Windows 10 USB Using Your Mac - Build a Bootable ISO From Your Mac's Terminal

Most new PCs don't come with DVD drives anymore. So it can be a pain to install Windows on a new computer.

Luckily, Microsoft makes a tool that you can use to install Windows from a USB storage drive (or "thumbdrive" as they are often called).

But what if you don't have a second PC for setting up that USB storage drive in the first place?

In this tutorial we'll show you how you can set this up from a Mac.

Step 1: Download the Windows 10 ISO file

You can download the ISO file straight from Windows. That's right - everything we're going to do here is 100% legal and sanctioned by Microsoft.