Skip to content

Instantly share code, notes, and snippets.

Lauri Võsandi laurivosandi

Block or report user

Report or block laurivosandi

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
laurivosandi / switcharoo.c
Last active Nov 13, 2017
Illustrative and probably very buggy example of what su essentially does
View switcharoo.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <string.h>
#include <crypt.h>
* Illustrative and probably very buggy example of what su essentially does
laurivosandi /
Last active Dec 28, 2019
OLED screen demo on ESP32 with MicroPython
# Pull the SDD1306 lib from here
from time import sleep_ms
from machine import Pin, I2C
from ssd1306 import SSD1306_I2C
buf = "wubba lubba dub dub "
i2c = I2C(-1, Pin(4),Pin(5),freq=40000) # Bitbanged I2C bus
assert 60 in i2c.scan(), "No OLED display detected!"
laurivosandi /
Created Aug 18, 2017
Websockets client for MicroPython
Websockets client for micropython
Based very heavily on
import ubinascii as binascii
import urandom as random
import ure as re
laurivosandi /
Created May 12, 2017
SMART info parser
# encoding: utf-8
import subprocess
import os
import re
print "Storage status:"
for node in os.listdir("/dev"):
if not re.match("[sv]d[a-z]$", node): continue
cmd = "/usr/sbin/smartctl", "-a", "/dev/%s" % node
Estonian ID-card authentication middleware for Django,
but this should be pretty easily modifiable for any application
To use install
apt-get install -y python python-pip python-dev \
python-cffi build-essential libffi-dev libssl-dev
pip install cryptography
You can’t perform that action at this time.