Skip to content

Instantly share code, notes, and snippets.

View davehunt's full-sized avatar

Dave Hunt davehunt

View GitHub Profile
@robmiller
robmiller / git-cleanup-repo
Last active February 27, 2024 10:09
A script for cleaning up Git repositories; it deletes branches that are fully merged into `origin/master`, prunes obsolete remote tracking branches, and as an added bonus will replicate these changes on the remote.
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <[email protected]>
# Adapted from the original by Yorick Sijsling
git checkout master &> /dev/null
# Make sure we're working with the most up-to-date version of master.
git fetch
@santiycr
santiycr / setContext-user-extension.js
Created November 23, 2010 23:06
User extension to make Selenium's setContext more visual and useful in videos recorded from tests
window.contextTimeout = null;
function fade(ctx) {
var alpha = ctx.style.opacity;
var new_alpha = alpha - 0.1;
ctx.style.opacity = new_alpha;
if (new_alpha){
window.contextTimeout = setTimeout(function(){fade(ctx);}, 50);
} else {
this.browserbot.getUserWindow().document.body.removeChild(ctx);