Skip to content

Instantly share code, notes, and snippets.

@mhl
mhl / meld-compare-refs.py
Created July 29, 2010 16:46
Extract the trees from two commits to a temporary directory and run meld on them
#!/usr/bin/python3.1
# This is script that extracts the trees of two commits to temporary
# directories and then runs meld on both directories, so you can compare
# them using meld's nice recursive browsing interface.
#
# This is for an answer to this question:
# http://stackoverflow.com/questions/2006032/view-differences-of-branches-with-meld
from subprocess import call, Popen, PIPE, check_call
#!/usr/bin/env ruby
require 'rubygems'
require 'mechanize'
require 'optparse'
options = {}
op = OptionParser.new do |opts|
opts.on('-f=FILE', '--file=FILE', "Write output to specified file.") do |f|
options[:file] = f
@seratch
seratch / build.sbt
Created December 1, 2011 06:07
Scala School - Testing with specs2 examples
organization := "net.seratch"
name := "sandbox"
version := "0.1"
scalaVersion := "2.9.1"
libraryDependencies ++= Seq(
"junit" % "junit" % "4.9" withSources(),
@gurglet
gurglet / git-post-checkout.sh
Created February 9, 2012 13:55
Git post checkout hook that reminds you of South migration changes when changing branches. Can be useful when you are when you are testing out a branch from someone else that requires migrations. Put the file in .git/hooks/post-checkout
#!/bin/bash
# Git post checkout hook.
# Reminds you of South migration changes when switching branches.
# Can be useful when you are when you are testing out a branch from
# someone else that requires migrations.
# Put the file in .git/hooks/post-checkout
PREVIOUS_HEAD=$1
NEW_HEAD=$2
@moklett
moklett / openconnect.md
Created July 24, 2012 15:21
OpenConnect VPN on Mac OS X

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect

@agnoster
agnoster / README.md
Last active April 6, 2024 22:35
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@crccheck
crccheck / README.md
Last active March 2, 2024 16:39
Python Packaging

What the Hell? -- A Journey Through the Nine Circles of Python Packing

Writing a setup.py

map

I am no Virgil, but having stumbled my way through Python packaging a few times already, I'm documenting the things I learn as I go here.

To help me learn, I took a survey of the top 15 Python packages on Github along with 12 other commonly referenced packages. I thought... if there are any best

@Nurdok
Nurdok / python_conversion.md
Last active December 16, 2022 03:45
Python Conversion

Python Number Conversion Chart

From To Expression
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@andreagrandi
andreagrandi / git_branch_shell.sh
Created August 20, 2013 20:29
Add colored git branch name to your shell prompt
# Credits: http://qugstart.com/blog/git-and-svn/add-colored-git-branch-name-to-your-shell-prompt/
function parse_git_branch_and_add_brackets {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \[\1\]/'
}
PS1="\h:\W \u\[\033[0;32m\]\$(parse_git_branch_and_add_brackets) \[\033[0m\]\$ "