Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Coding

Jibran Ijaz jibran

👨‍💻
Coding
View GitHub Profile
@chx
chx / gist:d4e30aaf8e3d9a6fccad9e89bb8d73b8
Created Jun 5, 2016
Git helpers, put it in .bashrc / .zshrc
View gist:d4e30aaf8e3d9a6fccad9e89bb8d73b8
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
View git-cleanup.sh
#!/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
@JohnAlbin
JohnAlbin / _init.scss
Last active Dec 26, 2015
Handing IE8 and lower with Breakpoint + compass/support
View _init.scss
// 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.
@kimpepper
kimpepper / gist:6245571
Created Aug 15, 2013
Run phing from a sub-directory
View gist:6245571
ph() {
path=$(pwd)
while [[ "$path" != "" && ! -e "$path/build.xml" ]]; do
path=${path%/*}
done
(cd $path && phing $@)
}
@fubhy
fubhy / .gitconfig
Last active Sep 20, 2016
My personal .gitconfig (mostly stolen from others) :-)
View .gitconfig
[user]
# Credentials.
name = Foo Bar
email = foo@bar.com
drupal = $(whoami)
[credential]
# Save passwords in ~/.git-credentials.
helper = store
@larowlan
larowlan / git-cleanup
Created Jun 14, 2013
Clean up old git branches
View git-cleanup
#!/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