Skip to content

Instantly share code, notes, and snippets.

View markhalliwell's full-sized avatar
🦄
unicorns!

Mark Halliwell markhalliwell

🦄
unicorns!
  • Fort Worth, Texas, USA
View GitHub Profile
@markhalliwell
markhalliwell / rsync-progress.sh
Last active January 22, 2016 13:25
This only really works if rsyncing entire folders. Single files do work, however it will just appear to stand still (no progress). Also, change the path to cocoaDialog accordingly.
#!/bin/bash
# cocoaDialog Rsync Progress
#
# Rsync files using the cocoaDialog progress bar. Example usage:
# $ rsync -avr --progress ~/source ~/destination | ./rsync-progress.sh
#
# Copyright (C) 2014 Mark Carver
#
# Adapted from Kevin Hendricks example code
@joelpittet
joelpittet / gist:9245960
Created February 27, 2014 07:38
git pastings
alias cap='curl `pbpaste` | git apply -v'
alias cape='curl `pbpaste` | git apply -v --index'
alias capp='curl `pbpaste` | patch -p1'
alias capv='curl `pbpaste` | patch -p1 --dry-run'
alias carp='curl `pbpaste` | git apply -Rv'
alias carpe='curl `pbpaste` | git apply -Rv --index'
alias cav='curl `pbpaste` | git apply -v --check'
@davereid
davereid / gist:6504748
Last active December 22, 2015 17:18
Drupal.org blacklist user style
@-moz-document domain("drupal.org") {
.submitted a[href="/user/422992"]:after, /*IWasBornToWin*/
.submitted a[href="/user/25027"]:after, /*dgtlmoon*/
.submitted a[href="/user/412207"]:after, /*jddeli*/
.submitted a[href="/user/69670"]:after /*zoon_unit*/
{
content: "BLACKLISTED";
background-color: #000000;
color: #ffffff;
font-weight: bold;
@star-szr
star-szr / xhprof-kit.sh
Last active February 7, 2016 14:16
xhprof-kit aliases and functions
# Creates a baseline from your current branch (should usually be 8.x).
alias bbranch='./xhprof-kit/benchmark-branch.sh `git rev-parse --abbrev-ref HEAD`'
# Using the baseline xhprof identifier from the bbranch command above will benchmark 8.x against the baseline and your patched branch.
# e.g.
# bbranches [XHPROF-IDENTIFIER] [twig-branch-name-here-1234456]
function bbranches() {
originalbranch="$(git rev-parse --abbrev-ref HEAD)"
base=$1
shift
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: