Skip to content

Instantly share code, notes, and snippets.

View matthewmccullough's full-sized avatar

Matthew J. McCullough matthewmccullough

View GitHub Profile
tell application "Finder"
activate
set these_items to the selection
log these_items
repeat with this_item in these_items
set item_name to (get displayed name of this_item)
if item_name is not ".DS_Store" then
set current_com to (get comment of this_item)
if current_com is not "" then
set comment of this_item to current_com as string
layout title description path
barewithrelated
Book Authoring Using GitHub and Git
Formats, tips and techniques for using GitHub and Git as the version control and collaborative platform for writing short and long form books.
usecases/_posts/2001-01-01-book-authoring-using-git-and-github.md

GitHub and Git are not just for writing programming code. They can also be an effective tool for writing articles and books. Matthew McCullough has written a quick guide to writing books in lightweight formats. This article will be folded into this Teaching repository over the coming months.

What is this?

@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:

@matthewmccullough
matthewmccullough / game-theory-books.markdown
Created May 17, 2012 22:10
Game Theory Book list by Matthew McCullough

Economics & Software Development - Book List

The following books are ordered in descending order of Matthew's preference.

by Avinash K. Dixit

Recommended by Ted Neward. A different perspective and writing style from the other volumes listed.

“I am hard pressed to think of another book that can match the combination of practical insights and reading enjoyment.”—Steven Levitt

@matthewmccullough
matthewmccullough / .zshrc
Created January 20, 2011 00:00
A configuration to maintain history across sessions and share it across terminals in ZShell
##############################################################################
# History Configuration
##############################################################################
HISTSIZE=5000 #How many lines of history to keep in memory
HISTFILE=~/.zsh_history #Where to save history to disk
SAVEHIST=5000 #Number of history entries to save to disk
#HISTDUP=erase #Erase duplicates in the history file
setopt appendhistory #Append history to the history file (no overwriting)
setopt sharehistory #Share history across terminals
setopt incappendhistory #Immediately append to the history file, not just when a term is killed
@matthewmccullough
matthewmccullough / gist:988077
Created May 24, 2011 03:02
Visualize Git Orphans via gitk and log
# Put this in your .gitconfig file under the alias section
orphank = !gitk --all `git reflog | cut -c1-7`&
# Then run it by typing 'git orphank' on the command line.
# A text version of the same is
orphanl = !git --pretty=oneline --abbrev-commit --graph --decorate `git reflog | cut -c1-7`
@matthewmccullough
matthewmccullough / sfojug-commandlinehistory.md
Created September 13, 2012 04:06
Command Line History from San Francisco JUG 2012-09-11 Event

CLI History

git hash-object -t tree /dev/null

git init project1
echo "Hello World" > hello.txt
git add hello.txt
git commit -m"First hello"

printf “blob 12\000Hello World\n” | shasum

@matthewmccullough
matthewmccullough / git-deletealltags.bsh
Created April 1, 2011 20:29
Script to delete all tags both locally and remotely
for t in `git tag`
do
git push origin :$t
git tag -d $t
done
@matthewmccullough
matthewmccullough / GitHub Free Class and Office Hours on 2014-01-17.md
Created January 20, 2014 05:27
GitHub Free Class and Office Hours on 2014-01-17