Skip to content

Instantly share code, notes, and snippets.

Avatar

Dave Hunt davehunt

View GitHub Profile
@robmiller
robmiller / git-cleanup-repo
Last active Dec 2, 2021
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.
View git-cleanup-repo
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <rob@bigfish.co.uk>
# 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 Nov 23, 2010
User extension to make Selenium's setContext more visual and useful in videos recorded from tests
View setContext-user-extension.js
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);