Skip to content

Instantly share code, notes, and snippets.

# some example code from pyusb, otherwise its all public domain. enjoy & keep hackin! - ladyada
import sys
# sys.path.append('/Users/qdot/git-projects/library/usr_darwin_10.5_x86/lib/python2.6/site-packages')
import usb.core
import usb.util
import sys
import time
# find our device

Keybase proof

I hereby claim:

  • I am wzhd on github.
  • I am wzhd (https://keybase.io/wzhd) on keybase.
  • I have a public key whose fingerprint is 546B 9D24 C61A CD6C 523C 2AF5 8CD7 B6A1 40BA 5CFD

To claim this, I am signing this object:

#include <iostream>
bool order(int &a, int &b, int &c) {
if (a < b && b < c)
return true;
else {
if (a > b) {
std::swap(a, b);
}
if (b > c) {
@wzhd
wzhd / vcf2csv.py
Last active August 29, 2015 14:17 — forked from senko/vcf2csv.py
#!/usr/bin/env python
"""
Parse phone and email records out of vCard file and store them in a CSV.
Copyright (C) 2012 Senko Rasic <senko.rasic@dobarkod.hr>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
@wzhd
wzhd / figure_1.png
Last active September 18, 2015 01:53
A simple Venn diagram
figure_1.png
Verifying that +wzhd is my blockchain ID. https://onename.com/wzhd
@wzhd
wzhd / README.md
Last active November 22, 2015 04:22
Anki addon zoom

Use larger fonts in Anki.

#!/usr/bin/ash
run_hook() {
modprobe -a -q dm-crypt >/dev/null 2>&1
[ "${quiet}" = "y" ] && CSQUIET=">/dev/null"
# Get keyfile if specified
ckeyfile="/crypto_keyfile.bin"
if [ -n "$cryptkey" ]; then
IFS=: read ckdev ckarg1 ckarg2 <<EOF
@wzhd
wzhd / .gitignore
Last active May 14, 2016 14:35
qtile-config
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
@wzhd
wzhd / QtVlc
Last active March 1, 2018 15:21
Script using pyqt5 and libvlc
This is the title of the gist.