Skip to content

Instantly share code, notes, and snippets.

solsTiCe d'Hiver solsticedhiver

Block or report user

Report or block solsticedhiver

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
solsticedhiver /
Last active Apr 6, 2019
Script to search offset of the LUKS header on a device file
#!/usr/bin/env python3
import threading
import queue
import argparse
import os.path
import sys
LUKS_HEADER = b'LUKS\xba\xbe'
solsticedhiver /
Created Jan 31, 2019 — forked from Lahorde/
Initialize an external I2C RTC module on raspberry using udev and systemd


Enable i2c RTC using systemd. A udev rules triggers an I2C systemd service on I2C kernel module adding. Service then loads I2C driver adding a new I2C device to /sys Then kernel loads I2C RTC driver and adds an RTC device It triggers a udev rules that updates hardware clock

Application on raspberry pi

Enable I2C

  • enable I2C in config.txt, adding device_tree_param=i2c1=on
set -e
export IFS='
# that's a dangerous script to run because it removes all your snaps. Don't do that
function echo_cmd() {
echo "$@"
solsticedhiver / search.html
Created Apr 5, 2018
Python script to query via its API and launch a html page with result using leaflet
View search.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name='description' content="A page showing results from API">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="">
import sys
import re
import os
import mailbox
def convert(maildir, mbox_name):
mbox = mailbox.mbox(mbox_name)
You can’t perform that action at this time.