Skip to content

Instantly share code, notes, and snippets.

@vmalloc
vmalloc / gist:1165155
Created August 23, 2011 13:44
Script to poll a jenkins job and run growlnotify with the status at its end
import time
import argparse
import urllib2
import lxml.etree
import subprocess
parser = argparse.ArgumentParser()
parser.add_argument("--sleep", default=1, type=int)
parser.add_argument("server")
@vmalloc
vmalloc / hack.sh
Created April 2, 2012 06:08 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@vmalloc
vmalloc / gist:3978770
Created October 30, 2012 07:23
Emacs configuration to lookup current symbol in Dash
(defun dash-current-symbol ()
(interactive)
(browse-url (format "dash://%s" (current-word)))
)
(global-set-key (kbd "C-c d") 'dash-current-symbol)
@vmalloc
vmalloc / retries.py
Created November 28, 2012 10:29
Simple retries in Python
def retries(num_retries):
"""
Generates a sequence of retry attempt objects, helping you write nicer retry code:
Example usage:
for retry in retries(num_retries):
if not retry.first:
logging.debug("Retrying...")
try:
some_operation()
@vmalloc
vmalloc / commit_issue.py
Created December 23, 2012 12:16
Small utility to commit a currently assigned Jira issue via git, using *dialog* and the Jira REST API.
#! /usr/bin/python
# -*- mode: python -*-
from cStringIO import StringIO
from collections import OrderedDict
import argparse
import requests
import subprocess
import sys
import tempfile
@vmalloc
vmalloc / experiment_with
Last active December 19, 2015 15:08
Quick wrapper for experimenting with python packages in a temporary virtualenv using devpi
#! /bin/bash -x -e
## Example usage:
# $ ./experiment_with numpy matplotlib
UUID=`echo $* | sha1sum | awk '{print $1}'`
VENV_DIR=/tmp/temp_venv_$UUID
devpi use

Keybase proof

I hereby claim:

  • I am vmalloc on github.
  • I am vmalloc (https://keybase.io/vmalloc) on keybase.
  • I have a public key whose fingerprint is C73F 6BEC 873D 2C13 6C9F E0B2 0464 700A 8589 A747

To claim this, I am signing this object:

@vmalloc
vmalloc / instructions.md
Created March 11, 2019 14:15 — forked from henrebotha/instructions.md
Karabiner Elements: Caps Lock + I/J/K/L to Arrow Keys (a la Pok3r)

Instructions

  1. Install Karabiner Elements
  2. Open your karabiner.json file (it will be in ~/.config/karabiner/karabiner.json).
  3. Find complex_modifications. It will have a key rules that takes a list ("rules": [...]).
  4. Inside the square brackets, paste this:
{
    "description": "Change Caps Lock + I/J/K/L to Arrow Keys",
@vmalloc
vmalloc / Dragons.svg
Last active October 20, 2019 06:49
Here be dragons logo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.