Skip to content

Instantly share code, notes, and snippets.

Mark Carver markcarver

Block or report user

Report or block markcarver

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@markcarver
markcarver / rsync-progress.sh
Last active Jan 22, 2016
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.
View rsync-progress.sh
#!/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
View gist:9245960
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 Dec 22, 2015
Drupal.org blacklist user style
View gist:6504748
@-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;
@Cottser
Cottser / xhprof-kit.sh
Last active Feb 7, 2016
xhprof-kit aliases and functions
View xhprof-kit.sh
# 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 Aug 13, 2012
Checkout github pull requests locally
View pr.md

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:

You can’t perform that action at this time.