Skip to content

Instantly share code, notes, and snippets.

View josephhainline's full-sized avatar

Joseph Hainline josephhainline

View GitHub Profile
### Keybase proof
I hereby claim:
* I am josephhainline on github.
* I am joehainline (https://keybase.io/joehainline) on keybase.
* I have a public key ASAYz6mWYNqLnpGo0MORaNVTsl4R_2TmVLz-T8PeGGXuAgo
To claim this, I am signing this object:
@josephhainline
josephhainline / convert_github_md_to_gitlab_format.sh
Created May 10, 2015 02:30
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 port_repos_and_wikis_from_github_to_gitlab.sh to get …
#!/bin/bash
echo
echo "Processing all *.md files in current directory..."
echo
# Loop through all .md files in directory and rename spaces to dashes
for file in *" "*; do
echo "Renaming $file"
mv -- "$file" "${file// /-}"
#!/bin/bash
# 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 (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@josephhainline
josephhainline / rspec-syntax-cheat-sheet.rb
Last active December 28, 2015 04:39 — forked from dnagir/rspec-syntax-cheat-sheet.rb
corrected lines 194-201
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# 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")

Entry

  • 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 = 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:

@josephhainline
josephhainline / github_issues_to_csv_v3.rb
Created October 24, 2012 15:35 — forked from kevinpschaaf/github_issues_to_csv_v3.rb
Exports Github issues to CSV (API v3)
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
josephhainline / github_issues_to_csv.rb
Created October 24, 2012 15:16 — forked from tkarpinski/github_issues_to_csv.rb
Exports Github issues to CSV (API v3)
require 'octokit'
require 'csv'
require 'date'
# Github credentials to access your private project
USERNAME="USER_NAME"
PASSWORD="SEKRIT"
# Project you want to export issues from
USER="REPO_OWNER"
PROJECT="REPO_NAME"