Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block JonasPf

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
View gist:77fe919c5e146628638c55cf7506bffc
### Keybase proof
I hereby claim:
* I am jonaspf on github.
* I am jonaspf ( on keybase.
* I have a public key ASCr5nrf_TjnIu2pM823Scn45eCMa450-69e9rT5Od9BRQo
To claim this, I am signing this object:
View gist:216a9b8457a16d472664093492081300
Verifying my Blockstack ID is secured with the address 1GPb42kqRpLpUDG2kAtwzRXDsjFYVmTtGN
import json
import subprocess
import os
from collections import namedtuple
from tempfile import NamedTemporaryFile
from ansible.parsing.dataloader import DataLoader
from ansible.vars import VariableManager
from ansible.inventory import Inventory
from import Play
JonasPf /
Created Feb 8, 2017
Bitcoin hex address to base58check
import binascii
import base58
import sys
string = sys.argv[1]
hex_values = binascii.unhexlify(string)
JonasPf /
Created Mar 22, 2016
List openstack freezer backups with datetime and size
import subprocess
import datetime
import re
import sys
backups = subprocess.check_output(['swift', 'list', sys.argv[1]]).splitlines()
width = None
total = 0
JonasPf /
Created Jul 15, 2014
wxPython: Create and save bitmap
w = 500
h = 300
bmp = wx.EmptyBitmap(w, h)
dc = wx.MemoryDC()
JonasPf /
Created Jul 14, 2014
Custom wxPython control
import wx
class CustomPanel(wx.PyPanel):
def __init__(self, parent):
wx.PyPanel.__init__(self, parent)
self.Bind(wx.EVT_PAINT, self.OnPaint)
self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground)
JonasPf / gist:9461819
Last active Aug 29, 2015
Create distinct colours
View gist:9461819
# Creates a html page with a list of distinct looking colours for graphs, etc.
# Algorithm from:
# Jonas Pfannschmidt
from colorsys import hsv_to_rgb
golden_ratio_conjugate = 0.618033988749895
JonasPf /
Created Apr 9, 2013
Collection of functions and classes I use to automate console applications. Tested on Python 2.7 and Windows 7.
import os
import re
import sys
import zipfile
import shutil
import subprocess
import time
import threading
import Queue
You can’t perform that action at this time.