Skip to content

Instantly share code, notes, and snippets.

View matthewmccullough's full-sized avatar

Matthew J. McCullough matthewmccullough

View GitHub Profile
@tkarpinski
tkarpinski / github_issues_to_csv.rb
Created April 12, 2012 18:09 — forked from henare/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"
@matthewmccullough
matthewmccullough / git-compressing-and-deltas.md
Created May 14, 2012 19:05
Git, Compression, and Deltas - An explanation

Git Compression of Blobs and Packfiles.

Many users of Git are curious about the lack of delta compression at the object (blob) level when commits are first written. This efficiency is saved until the pack file is written. Loose objects are written in compressed, but non-delta format at the time of each commit.

A simple run though of a commit sequence with only the smallest change to the image (in uncompressed TIFF format to amplify the observable behavior) aids the understanding of this deferred and different approach efficiency.

The command sequence:

Create the repo:

@LordGaav
LordGaav / post-commit
Created June 19, 2012 11:59
Git hook that determines the author based on the email address in a SSH key. Doesn't work because Git doesn't check the config between pre-commit and commit.
#!/bin/sh
# Retrieve author information as Git sees it while commiting
AUTHORINFO=$(git var GIT_AUTHOR_IDENT) || exit 1
NAME=$(printf '%s\n' "${AUTHORINFO}" | sed -n 's/^\(.*\) <.*$/\1/p')
EMAIL=$(printf '%s\n' "${AUTHORINFO}" | sed -n 's/^.* <\(.*\)> .*$/\1/p')
printf "AUTHORINFO: %s\n" "${AUTHORINFO}"
printf "NAME: %s\n" "${NAME}"
printf "EMAIL: %s\n" "${EMAIL}"
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

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:

@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
@trishume
trishume / .slate
Created November 20, 2012 22:21
My Slate config
# Configs
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
config secondsBetweenRepeat 0.1
config checkDefaultsOnLoad true
config focusCheckWidthMax 3000
config keyboardLayout dvorak
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
@VxJasonxV
VxJasonxV / gist:4211820
Created December 5, 2012 03:08 — forked from tlberglund/gist:3208768
Live Log Script
#!/bin/bash
while (sleep 1)
do
clear
git --no-pager log -$1 --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
done
@vparihar01
vparihar01 / nokogiri_libxml_homebrew_lion_installation.sh
Created June 25, 2013 07:01
How to fix: Nokogiri Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib provides version 10.0.0. dlopen bundle.open. Using homebrew on lion to install nokogiri and lixml
FIXME:
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
or
ERROR -: Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib provides version 10.0.0
gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2