Skip to content

Instantly share code, notes, and snippets.


Matthew J. McCullough matthewmccullough

View GitHub Profile
ericlevine / migrate_repo.rb
Last active Aug 29, 2015
GitHub to GitHub repository migration script
View migrate_repo.rb
require "json"
require "typhoeus"
require "pp"
# MigrateRepo usage instructions:
# The way this is used at Airbnb for migrating from GitHub to GHE is by
# creating a separate organization with no members called "migration",
# adding that as the target organization, and then once the migration
# has finished, moving it over to the intended location.
View gh_unsub.rb
#!/usr/bin/env ruby
require 'octokit'
pass_re = /^password: "(.*)"$/
token = '***** GET A TOKEN *****'
c = => token)
user_login = c.user.login
alecthegeek /
Last active Aug 29, 2015
CLI script to copy a file to the user's public DropBox folder and put a shortened public link in the clipboard. Inspired by @matthewmccullough and @tlberglund
#! /usr/bin/env bash
# $1 file to share
db_home=$HOME/DropBox # You need to run the DropBox client on your workstation
db_id=<999999> #Put your Dropbox ID here
if [[ -f "$1" ]] ; then
cp "$1" $db_home/Public #Only works if you have an Old Style account with magic Public directory
matthewmccullough / Writing Tools
Created Jan 13, 2012
How To Write A Technical Book (One Man's Modest Suggestions)
View Writing Tools
Dierk / pre-receive.groovy
Created Feb 9, 2012
a pre-receive hook to allow both: feature branches and agile CI
View pre-receive.groovy
// a git pre-receive hook
// that automatically merges all pushes to feature branches
// into a dedicated continuous-integration (ci) branch.
// Since we cannot merge in a bare repo, we work on a temporary clone.
// Dierk Koenig
def ciBranch = 'master'
def mergeName = 'merge'
def hereDirPath = new File('.').canonicalPath
mtnygard / gist:2254147
Created Mar 30, 2012
Books I recommended today
View gist:2254147
anaisbetts / .gitattributes
Created Dec 3, 2014
View .gitattributes
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
napcs /
Created Sep 8, 2012
Video project

Intro to Programming video

I want to make a video to show my class of would-be IT people. If you write code, would you send me a video clip (webcam, less than 30s) with the following?

  • Introduce yourself (name, where you work)
  • Why you love what you do
  • Why you love open-source software (optional, but would be super helpful)

Email the clip (or a link I can download the clip) to bphogan at gmail and be sure to include your Twitter username so I can add that on your clip.


Switching to GitHub

Many companies ask why they should switch to Git and GitHub. The answer primarily lies in doing less repetitive work, and making your source code control efforts disppear into the background instead of be in the forefront of your workflow. Your focus should be on your creative work and just incidentally have it versioned. As soon as your project is no longer a solo effort, you desire to have it support collaboration. In the space of version control, our users claim that no set of tools does that as well as Git and GitHub.

These goals are explained in a highly creative way by GitHub's CEO in The Git Parable.

Additionally, a growing constituency of open source is hosted at GitHub. In June of 2011, GitHub had [more commits than Sourceforge, Google Code, and CodePlex combined](

tlberglund /
Created Sep 22, 2012
NFJS Atlanta Git Workshop

NFJS Git Workshop

  • Create a repo
    • git config --global "Tim Berglund"
    • git config --global ""
    • git config --global color.ui auto
    • git init atlanta
  • Add files
    • Create caesar.txt
    • git add caesar.txt