Skip to content

Instantly share code, notes, and snippets.


Joseph Hainline josephhainline

View GitHub Profile
View gist:bffcd178ec4e8e949c420389f5d643cf
### Keybase proof
I hereby claim:
* I am josephhainline on github.
* I am joehainline ( on keybase.
* I have a public key ASAYz6mWYNqLnpGo0MORaNVTsl4R_2TmVLz-T8PeGGXuAgo
To claim this, I am signing this object:
josephhainline /
Created May 10, 2015
If you have repos in github that you'd like to port to gitlab, with all branches and tags, this will do it. If you want to port your wikis too, this will also work, although it's only a 90% solution for wikis. Github and gitlab use different file name and markdown conventions. Run the command to get …
echo "Processing all *.md files in current directory..."
# Loop through all .md files in directory and rename spaces to dashes
for file in *" "*; do
echo "Renaming $file"
mv -- "$file" "${file// /-}"
# This script automatically sets the version and short version string of
# an Xcode project from the Git repository containing the project.
# To use this script in Xcode, add the script's path to a "Run Script" build
# phase for your application target.
set -o errexit
set -o nounset
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
View rspec-syntax-cheat-sheet.rb
# RSpec 2.0 syntax Cheet Sheet by
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")


  • Passion
    • Wants to learn
    • Eager to learn
  • Professionalism
    • Communicates in a respectful manner when interacting with co-workers
    • Actively engages in pairing when given the opportunity
  • Receives constructive criticism well

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 =

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 github_issues_to_csv_v3.rb
require 'octokit'
require 'csv'
require 'date'
# Description:
# Exports Github issues from one or more repos into CSV file formatted for import into JIRA
# Note: By default, all Github comments will be assigned to the JIRA admin, appended with
# a note indicating the Github user who added the comment (since you may not have JIRA users
# created for all your Github users, especially if it is a public/open-source project:
josephhainline / github_issues_to_csv.rb
Created Oct 24, 2012 — forked from tkarpinski/github_issues_to_csv.rb
Exports Github issues to CSV (API v3)
View github_issues_to_csv.rb
require 'octokit'
require 'csv'
require 'date'
# Github credentials to access your private project
# Project you want to export issues from