Skip to content

Instantly share code, notes, and snippets.

Rick van Hattem WoLpH

Block or report user

Report or block WoLpH

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@WoLpH
WoLpH / zfs_copy.sh
Last active Aug 29, 2015
Simple script to copy zfs vdevs (partitions) from one zpool to another with a progress bar :)
View zfs_copy.sh
#!/bin/sh
source=$1
dest=$2
snapshot=$3
size=$(zfs send -nP $source@$snapshot 2>&1 | grep size | awk '{print $2}')
echo "$source@$snapshot -> $dest: $size"
zfs send $source@$snapshot | pv --timer --progress --eta --rate --average-rate --bytes --size $size --cursor --name $source | zfs receive -Fvu $dest
View multirater_kfree.py
# Author: Raynor Vliegendhart
# LICENSE: MIT
import numpy
def multirater_kfree_np(n_ij, n, k):
'''
Computes Randolph's free marginal multirater kappa for assessing the
reliability of agreement between annotators.
View reraising_exceptions.py
def spam():
def spam():
def spam():
def spam():
def spam():
def spam():
def spam():
def spam():
def spam():
def spam():
View delete_from_plex.py
#!/usr/bin/python
# ############################################################################
# INFORMATION
# ############################################################################
# Developed by: Steven Johnson
#
# Last Updated: 11/13/2013 4:00AM PST
#
# Description: Auto-Delete Watched Items In Plex
#
@WoLpH
WoLpH / qlikview_test.html
Last active Aug 29, 2015
Testing Qlikview Extension scripts using Qva emulation outside of Qlikview
View qlikview_test.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Qlikview Extension Test</title>
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
@WoLpH
WoLpH / timer.py
Created Oct 11, 2014
Python timer generator for simple duration measurement
View timer.py
import datetime
def timer(print_=True):
last = datetime.datetime.now()
while True:
now = datetime.datetime.now()
delta = now - last
if print_:
print 'Duration: %s' % delta
@WoLpH
WoLpH / recreate_virtualenv.sh
Last active Aug 29, 2015
Virtualenv recreating using virtualenvwrapper. Tested with OS X Homebrew but should work with any linux/unix system
View recreate_virtualenv.sh
#!/bin/zsh -e
if [ ! -d "$PROJECT_HOME" ]; then
echo 'Your $PROJECT_HOME needs to be defined'
echo 'http://virtualenvwrapper.readthedocs.org/en/latest/install.html#location-of-project-directories'
exit 1
fi
if [ "" = "$1" ]; then
echo "Usage: $0 <project_name>"
@WoLpH
WoLpH / math_with_sticks_solver.py
Last active Aug 29, 2015
Solver for "math with sticks" puzzles
View math_with_sticks_solver.py
import re
sticks = {
0: 6,
1: 2,
2: 5,
3: 5,
4: 4,
5: 5,
6: 6,
@WoLpH
WoLpH / play_external.user.js
Created Apr 15, 2015
Userscript to play files in external media player
View play_external.user.js
// ==UserScript==
// @name Play in external player
// @namespace http://wol.ph/
// @version 1.0
// @grant GM_getValue
// @grant GM_openInTab
// @grant GM_registerMenuCommand
// @grant GM_setValue
// @include http://*
// @include https://*
@WoLpH
WoLpH / assign_to_me.user.js
Created Apr 15, 2015
Assign bug to me in Bugzilla
View assign_to_me.user.js
// ==UserScript==
// @name Assign to me (Bugzilla)
// @namespace http://wol.ph/
// @version 1.0
// @description
// @match http://bugzilla.3xo.eu/show_bug.cgi?id=*
// @copyright 2015, Wolph
// ==/UserScript==
var assigned_to_field = document.getElementsByName('assigned_to')[0];
You can’t perform that action at this time.