-
rev-parse [something]
- show the SHA of any weird git phrase
-
hash-object -w [file]
- take any file or stdin and return a blob sha
-
ls-tree (-r) [sha]
-
show the entries of a git tree in the db
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
BLUE="\[\033[0;34m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
WHITE="\[\033[1;37m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
COLOR_NONE="\[\e[0m\]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################## | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------------------------- | |
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005 | |
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5 | |
Latest version of this file (in English) is usually at: | |
http://sed.sourceforge.net/sed1line.txt | |
http://www.pement.org/sed/sed1line.txt | |
This file will also available in other languages: | |
Chinese - http://sed.sourceforge.net/sed1line_zh-CN.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git branch -r --merged | | |
grep origin | | |
grep -v '>' | | |
grep -v master | | |
xargs -L1 | | |
awk '{split($0,a,"/"); print a[2]}' | | |
xargs git push origin --delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
back_branch = 'refs/heads/backup' | |
`rm /tmp/backup_index` | |
ENV['GIT_INDEX_FILE'] = '/tmp/backup_index' | |
last_commit = `git rev-parse #{back_branch}`.strip | |
last_tree = `git rev-parse #{back_branch}^{tree}`.strip | |
`git add --all` | |
next_tree = `git write-tree`.strip |
This repository has moved to the use cases folder of https://github.com/github/teach.github.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
- "The Fifth Discipline", by Peter Senge (http://amzn.to/H7R4fp)
- "Lean Thinking", by James Womack (http://amzn.to/H7R9zK)
- "The Logic of Failure", by Dietrich Dorner (http://amzn.to/HyheLM)
- "Drift Into Failure", by Sidney Dekker (http://amzn.to/HpB8Fe)
- "Documenting Software Architecture", by Paul Clements (http://amzn.to/H7RtOP)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sh get_token.sh user pass | |
curl -s -d '{"scopes":["repo"],"note":"admin script"}' -u "$1:$2" -XPOST https://api.github.com/authorizations | grep token |
OlderNewer