Skip to content

Instantly share code, notes, and snippets.

View matthewmccullough's full-sized avatar

Matthew J. McCullough matthewmccullough

View GitHub Profile
@ericlevine
ericlevine / migrate_repo.rb
Last active August 29, 2015 13:56
GitHub to GitHub repository migration script
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.
#!/usr/bin/env ruby
require 'octokit'
pass_re = /^password: "(.*)"$/
token = '***** GET A TOKEN *****'
c = Octokit::Client.new(:access_token => token)
user_login = c.user.login
@alecthegeek
alecthegeek / dbshare.sh
Last active August 29, 2015 14:04
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
matthewmccullough / Writing Tools Writeup.md
Created January 13, 2012 23:07
How To Write A Technical Book (One Man's Modest Suggestions)
@Dierk
Dierk / pre-receive.groovy
Created February 9, 2012 23:50
a pre-receive hook to allow both: feature branches and agile CI
// 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
mtnygard / gist:2254147
Created March 30, 2012 19:10
Books I recommended today
@anaisbetts
anaisbetts / .gitattributes
Created December 3, 2014 16:26
USE THIS GITATTRIBUTES FOR EVERY NEW PROJECT FOREVER AND EVER
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
@napcs
napcs / video.md
Created September 8, 2012 16:25
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.

@virtualandy
virtualandy / gitingawayfromsvn.md
Created September 14, 2012 22:06
Git-ing away from SVN

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](http://www.readwriteweb.com/hack/2011/06/github-has-

@tlberglund
tlberglund / workshop-outline.md
Created September 22, 2012 20:43
NFJS Atlanta Git Workshop

NFJS Git Workshop

  • Create a repo
    • git config --global user.name "Tim Berglund"
    • git config --global user.email "tlberglund@github.com"
    • git config --global color.ui auto
    • git init atlanta
  • Add files
    • Create caesar.txt
    • git add caesar.txt