Skip to content

Instantly share code, notes, and snippets.

View j13k's full-sized avatar

John Fitzpatrick j13k

View GitHub Profile
@j13k
j13k / git_svn_bash_prompt.sh
Created April 9, 2018 06:51 — forked from woods/git_svn_bash_prompt.sh
Set color bash prompt according to git/svn branch, and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the branch/status of the current git repository
# * the branch of the current subversion repository
# * the return value of the previous command
#
# USAGE:
@j13k
j13k / post-checkout
Last active February 28, 2017 05:34 — forked from lyrixx/post-checkout
A post-checkout hook script to check Composer package status and warn of changes after switching branches
#!/bin/bash
#
# A post-checkout hook script to check Composer package status
# and warn of changes after switching branches.
#
# Put this file at: .git/hooks/post-checkout
# and make it executable
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587
PREV_COMMIT=$1
@j13k
j13k / rsync_backup.sh
Created April 1, 2016 10:11 — forked from tvwerkhoven/rsync_backup.sh
Improved script: - Check if run as root - Clarify rsync(1) flags - Add --inplace for performance, extra preservation flags - Check bless(8) target before setting Improved exclusion file: - Included files listed by Carbon Copy Cloner
#!/bin/bash
#
# This script backups an OS X system to an external volume, effectively
# cloning it. It is based on [0], [1] and [2] for OS X and [3] and [4] for
# Linux. One could also use commercial tools like SuperDuper! or Carbon Copy
# Cloner. The latter website has an interesting list[5] on what files to
# exclude when cloning.
#
# Exclusions (from CCC[5]), see rsync_excludes_osx.txt
#