Skip to content

Instantly share code, notes, and snippets.

View jibran's full-sized avatar
👨‍💻
Coding

Jibran Ijaz jibran

👨‍💻
Coding
View GitHub Profile
@larowlan
larowlan / git-cleanup
Created June 14, 2013 01:31
Clean up old git branches
#!/bin/bash
# This has to be run from master
git checkout master
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches
git branch --merged master | grep -v 'master$' | xargs git branch -d
@fubhy
fubhy / .gitconfig
Last active September 20, 2016 02:51
My personal .gitconfig (mostly stolen from others) :-)
[user]
# Credentials.
name = Foo Bar
email = foo@bar.com
drupal = $(whoami)
[credential]
# Save passwords in ~/.git-credentials.
helper = store
@kimpepper
kimpepper / gist:6245571
Created August 15, 2013 22:31
Run phing from a sub-directory
ph() {
path=$(pwd)
while [[ "$path" != "" && ! -e "$path/build.xml" ]]; do
path=${path%/*}
done
(cd $path && phing $@)
}
@JohnAlbin
JohnAlbin / _init.scss
Last active December 26, 2015 18:09
Handing IE8 and lower with Breakpoint + compass/support
// Initialize the Sass variables and partials used in this project.
// Set the legacy IE support variables. We override the default values set by
// the compass/support partial, but let styles-ie8.scss override these values.
$legacy-support-for-ie6 : false !default;
$legacy-support-for-ie7 : false !default; // Note the use of !default.
$legacy-support-for-ie8 : false !default;
// Partials to be shared with all .scss files.
@larowlan
larowlan / git-cleanup.sh
Created April 15, 2014 19:54
Git Cleanup
#!/bin/bash
# This has to be run from master
git checkout master
# Update our list of remotes
git fetch
# Prune stale local branches already removed from origin
git remote prune origin
# Remove local fully merged branches
@chx
chx / gist:d4e30aaf8e3d9a6fccad9e89bb8d73b8
Created June 5, 2016 22:47
Git helpers, put it in .bashrc / .zshrc
function git() {
# Path to the `git` binary
GIT="/usr/bin/git"
# Sanity check
if [ ! -f ${GIT} ]
then
echo "Error: git binary not found" >&2
return 255
fi