Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am tehmaze on github.
  • I am maze (https://keybase.io/maze) on keybase.
  • I have a public key whose fingerprint is 07E4 0BB3 3D63 D490 4797 3421 ED7B 1576 294D F221

To claim this, I am signing this object:

@tehmaze
tehmaze / wx.py
Created April 20, 2014 20:35
WX report generator for PyMultimonAPRS
#!/usr/bin/env python
import json
import pywapi
import sys
import time
LOCATION_ID = sys.argv[1]
wxs = pywapi.get_weather_from_weather_com('NLXX0250', 'metric')
@tehmaze
tehmaze / p1.py
Created January 1, 2014 14:10
P1 power meter daemon that stuffs data into graphite
#!/usr/bin/python
#
# usage: p1-daemon graphite.host.here
import serial
import socket
import sys
import time
@tehmaze
tehmaze / i3status-maze.py
Last active September 12, 2021 22:08
i3status script
#!/usr/bin/env python2
# -*- coding: utf8; -*-
import json
import glob
import multiprocessing
import os
import sys
import time
@tehmaze
tehmaze / cp437.py
Created September 13, 2012 13:47
cp437 in python
#!/usr/bin/python
# _______
# ____________ _______ _\__ /_________ ___ _____
# | _ _ \ _ | ____\ _ / | |/ _ \
# | / / / / | | | /___/ _ | | / /
# |___/___/ /___/____|________|___ | |_| |___|_____/
# \__/ |___|
#
#
# (c) 2009-2012 Wijnand Modderman-Lenstra <maze@pyth0n.org>
@tehmaze
tehmaze / .tmux.conf
Created July 23, 2012 23:08
tmux configuration, inspired on vim-powerline
# c-b .. really?
set-option -g prefix C-a
# c-a c-a for the last active window
bind-key C-a last-window
# command sequence for nested tmux sessions
bind-key a send-prefix
# start window numbering at 1
@tehmaze
tehmaze / hamlib-libusb-1.0.patch
Created April 16, 2012 15:06
hamlib-1.2.15 patch to look for libusb-1.0 rather than libusb
diff -ur hamlib-1.2.15.org/configure hamlib-1.2.15/configure
--- hamlib-1.2.15.org/configure 2012-02-03 03:47:07.000000000 +0100
+++ hamlib-1.2.15/configure 2012-04-16 17:05:11.000000000 +0200
@@ -19863,12 +19863,12 @@
pkg_cv_LIBUSB_CFLAGS="$LIBUSB_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb >= 0.1\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libusb >= 0.1") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0 >= 0.1\""; } >&5
@tehmaze
tehmaze / tmux.conf
Created August 11, 2011 08:32
tmux configuration
# c-b .. really?
set-option -g prefix C-a
# c-a c-a for the last active window
bind-key C-a last-window
# command sequence for nested tmux sessions
bind-key a send-prefix
# start window numbering at 1
@tehmaze
tehmaze / tsocks-1.8_macosx.patch
Created August 8, 2011 20:11
tsocks-1.8 patch for Mac OSX
diff -Nur tsocks-1.8.org/Makefile.in tsocks-1.8/Makefile.in
--- tsocks-1.8.org/Makefile.in 2002-03-16 11:12:40.000000000 +0100
+++ tsocks-1.8/Makefile.in 2011-08-08 22:17:27.000000000 +0200
@@ -1,6 +1,7 @@
# Makefile used by configure to create real Makefile
CC=@CC@
+SHLIB_EXT=@SHLIB_EXT@
prefix=@prefix@
exec_prefix = @exec_prefix@
@tehmaze
tehmaze / knoopje.sh
Created July 31, 2011 22:15
Tie together two VMWare (Fusion) serial pipes
#! /bin/sh
#
# Tie together two serial pipes in VMWare (Fusion)
#
# 1st:
# serial1.present = "TRUE"
# serial1.fileType = "pipe"
# serial1.yieldOnMsrRead = "TRUE"
# serial1.startConnected = "TRUE"
# serial1.fileName = "ax25-1"