Skip to content

Instantly share code, notes, and snippets.

View alpine-qemu-arm.sh
wget http://dl-cdn.alpinelinux.org/alpine/v3.15/releases/armv7/alpine-uboot-3.15.0-armv7.tar.gz
wget http://dl-cdn.alpinelinux.org/alpine/v3.15/releases/armv7/alpine-minirootfs-3.15.0-armv7.tar.gz
qemu-img create -f raw sd.img 512M
sudo losetup /dev/loop0 sd.img
sudo kpartx -av /dev/loop0
lsblk
sudo mkfs.ext4 /dev/mapper/loop0p1
mount /dev/mapper/loop0p1 /mnt
View gist:b14fc9ef16d2a313f9e3e528a0f0aad6
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36 Signal-Desktop/0.12.1
2016-05-14T13:15:46.678Z GET https://textsecure-service-ca.whispersystems.org:4433/v1/devices 200 Success
2016-05-14T13:15:46.680Z opening websocket
2016-05-14T13:15:47.055Z websocket open
2016-05-14T13:17:16.251Z websocket closed 1006
2016-05-14T13:17:16.255Z GET https://textsecure-service-ca.whispersystems.org:4433/v1/devices
2016-05-14T13:17:16.672Z GET https://textsecure-service-ca.whispersystems.org:4433/v1/devices 200 Success
2016-05-14T13:17:16.675Z opening websocket
2016-05-14T13:17:17.058Z websocket open
2016-05-14T13:18:46.253Z websocket closed 1006
@onny
onny / test.py
Created Sep 12, 2015
Bottlepy get parameters utf8
View test.py
#!/usr/bin/python
from bottle import route, run, template, request
@route('/hello/<name>')
def index(name):
prename = request.query['prename']
return template('<b>Hello {{prename}} {{name}}</b>!', name=name, prename=prename)
run(host='localhost', port=8080)
@onny
onny / test.py
Created Jul 14, 2015
I2C Buspirate Python3
View test.py
from I2C import *
import time
timestring = time.strftime("%Y-%m-%d %H:%M:%S")
i2caddr = 0x0B # Slave address of battery controller
def get_word(i2c, i2caddr, addr):
""" Reads two byte value (big-endian) from address addr """
i2c.send_start_bit();
stat = i2c.bulk_trans(2, [i2caddr<<1, addr]);