This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# First, prune the tracking branches without a remote | |
git fetch --prune | |
# Now list the ones that have been merged into master | |
BRANCHES=`git branch -l --merged master|grep -Ev "(^\*| master$| develop$)"` | |
# Get the SHA of the tip of both master and origin/master for comparison | |
MASTER_SHA=`git show master --pretty='%H'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BRANCHES_BEFORE_LOCAL=`git branch -l|wc -l` | |
BRANCHES_BEFORE_REMOTE=`git branch -r|wc -l` | |
# Check if we need to pop our changes afterwards | |
if [ "`git stash save`" == "No local changes to save" ] ; then | |
POP_CHANGES="false" | |
else | |
POP_CHANGES="true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
from bs4 import BeautifulSoup, NavigableString, Tag | |
def html_to_text(html): | |
"Creates a formatted text email message as a string from a rendered html template (page)" | |
soup = BeautifulSoup(html, 'html.parser') | |
# Ignore anything in head |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Use syntax highlighting by default | |
syntax on | |
" Use decent colors in screen | |
set background=dark | |
" Don't expand tabs... | |
set noexpandtab | |
" ...But if we were to, they would expand to 4 spaces | |
set shiftwidth=4 | |
" Tabs are 4 characters wide | |
set tabstop=4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pushd /tmp && | |
sudo apt-get update && \ | |
sudo apt-get dist-upgrade -y && \ | |
sudo apt-get install -y build-essential linux-headers-`uname -r` module-assistant && \ | |
sudo module-assistant prepare && \ | |
mkdir VMT && | |
pushd VMT && | |
cp -r /media/`whoami`/VMware\ Tools/* . && | |
tar zxf VMwareTools-*.tar.gz && | |
pushd vmware-tools-distrib && |