Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Thing.

Oisín Hurley oisin

💭
Thing.
View GitHub Profile
@oisin
oisin / WIN10.MD
Created Apr 27, 2022 — forked from hungneox/WIN10.MD
How Make a Windows 10 USB Using Your Mac - Build a Bootable ISO From Your Mac's Terminal
View WIN10.MD

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.

View 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:

View 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:

View optimize.sh
#!/bin/bash
PROGNAME=${0##*/}
INPUT=''
QUIET='0'
NOSTATS='0'
max_input_size=0
max_output_size=0
usage()
View gist:4444722
get_git_branch() {
git branch | awk '/^\*/ { print $2 }'
}
get_git_dirty() {
git diff --quiet || echo '*'
}
get_git_prompt() {
git branch &> /dev/null || return 1
@oisin
oisin / attach_snapshot_volumes.sh
Created Jan 20, 2012
Scripts to create/attach/snapshot multiple EBS volumes
View attach_snapshot_volumes.sh
(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:987247
Created May 23, 2011 — forked from leereilly/gist:987094
API version checking using Sinatra's before filter; supports nested resources
View gist:987247
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)