Skip to content

Instantly share code, notes, and snippets.

View solsticedhiver's full-sized avatar

solsTiCe d'Hiver solsticedhiver

View GitHub Profile
solsticedhiver / main.dart
Last active September 1, 2023 11:36
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
class MyApp extends StatelessWidget {
solsticedhiver / main.dart
Created April 21, 2023 17:33
import 'dart:math';
void main() {
var rng = Random();
List<List<int>> integers = List.generate(
15, (int i) => List.generate(5, (int j) => rng.nextInt(89)+10));
for (var L in integers) {
print( => [i, L.indexOf(i)]).toList());
solsticedhiver / main.dart
Created April 1, 2023 12:46
import 'package:flutter/material.dart';
* Tap/click the floating action button to scroll the horizontal ListView, and hover the first ListTile.
* It is hilghlighted, but the highlighted portion is shown hover/under the left vertical ListView.
void main() {
runApp(const MyApp());
class MyApp extends StatelessWidget {
solsticedhiver /
Last active March 7, 2022 21:21
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 January 31, 2019 14:30 — 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 April 5, 2018 13:48
Python script to query via its API and launch a html page with result using leaflet
<!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)