Skip to content

Instantly share code, notes, and snippets.

@thijstriemstra
thijstriemstra / sim800_at.diff
Created November 12, 2015 14:32
sim800 tests
diff --git a/txgsm/protocol.py b/txgsm/protocol.py
index 6c1ac70..7071d36 100644
--- a/txgsm/protocol.py
+++ b/txgsm/protocol.py
@@ -111,8 +111,191 @@ class TxGSMProtocol(LineReceiver):
"""
d = Deferred()
d.addCallback(self.next('ATE0'))
- d.addCallback(self.next('AT+CIMI'))
+
Verifying that +thijstriemstra is my blockchain ID. https://onename.com/thijstriemstra
@thijstriemstra
thijstriemstra / config.diff
Created June 20, 2016 23:27
rpi toolchain config diff
< # Automatically generated make config: don't edit
< # crosstool-NG 1.15.2 Configuration
< # Tue Aug 7 15:36:12 2012
---
> # Automatically generated file; DO NOT EDIT.
> # Crosstool-NG Configuration
5a5
> CT_CONFIGURE_has_make381=y
7d6
< CT_CONFIGURE_has_svn=y
@thijstriemstra
thijstriemstra / build-extension.sh
Created August 2, 2016 13:07
Compile static C-extension with multiple source files for PyQt
#!/bin/bash
set -e
set -o pipefail
source ../../settings.sh
export PATH=$PATH:$COMPILER_ROOT
export CC="${PLAT}gcc -pthread"
export AR="${PLAT}ar rcsv"
echo `${PLAT}gcc --version`

Keybase proof

I hereby claim:

  • I am thijstriemstra on github.
  • I am thijstriemstra (https://keybase.io/thijstriemstra) on keybase.
  • I have a public key whose fingerprint is 8C40 DF98 F750 A753 7AAF 5512 0516 CC19 A81B A379

To claim this, I am signing this object:

@thijstriemstra
thijstriemstra / pyqt_sevensegment_test.py
Last active November 22, 2016 17:02
time.sleep calls block pyqt app
#!/usr/bin/env python
"""
PyQt example for seven segment displays.
"""
import sys
import time
from PyQt5 import QtWidgets
@thijstriemstra
thijstriemstra / update-videojs.sh
Last active December 9, 2016 16:29
bump video.js version in examples and
#!/bin/bash
export OLD_VERSION=5.9.2
export NEW_VERSION=5.10.8
# check if language files exist
wget --delete-after https://vjs.zencdn.net/$NEW_VERSION/lang/nl.js
# update videojs in examples and documentation
find examples/ -type f -name '*.html' -exec sed -i '' -e "s/$OLD_VERSION/$NEW_VERSION/" {} \;
@thijstriemstra
thijstriemstra / bittrex_order_history.py
Created August 20, 2017 19:04
Parse fullOrders.csv downloaded from Bittrex account
"""
Parse fullOrders.csv downloaded from Bittrex account.
Requirements::
pip install dateparser
"""
import csv
runtime/cgo: pthread_create failed: Resource temporarily unavailable
SIGABRT: abort
PC=0x76dedf70 m=2 sigcode=4294967290
goroutine 0 [idle]:
goroutine 1 [chan receive, 437 minutes]:
main.btcdMain(0x0, 0x0, 0x0)
/home/rpitest/go/src/github.com/roasbeef/btcd/btcd.go:170 +0x6dc
main.main()
@thijstriemstra
thijstriemstra / async-pyqt-sevensegment.py
Last active April 10, 2018 08:57
pyqt async sevensegment example using quamash.QEventLoop and max7219
import sys
import time
import asyncio
from PyQt5.QtWidgets import (QApplication, QProgressBar, QMainWindow, QSlider,
QVBoxLayout, QWidget)
from quamash import QEventLoop, QThreadExecutor
import max7219.led as led