Skip to content

Instantly share code, notes, and snippets.

View MawKKe's full-sized avatar

Markus H MawKKe

View GitHub Profile
@MawKKe
MawKKe / split_ffmpeg.py
Last active August 7, 2021 21:50
MOVED TO: https://github.com/MawKKe/audiobook-split-ffmpeg | Split audio file with ffmpeg based on chapter metadata
#!/usr/bin/env python3
import sys
import os
import re
import subprocess as sub
import argparse
import tempfile
import json
from concurrent.futures import ThreadPoolExecutor, as_completed
@MawKKe
MawKKe / cryptsetup-with-luks2-and-integrity-demo.sh
Last active April 29, 2024 21:19
dm-crypt + dm-integrity + dm-raid = awesome!
#!/usr/bin/env bash
#
# Author: Markus (MawKKe) ekkwam@gmail.com
# Date: 2018-03-19
#
#
# What?
#
# Linux dm-crypt + dm-integrity + dm-raid (RAID1)
#
@MawKKe
MawKKe / fizzbuzz.c
Last active June 29, 2019 22:41
Unconditional fizzbuzz
//
// Unconditional FizzBuzz
//
// Author: Markus (MawKKe) ekkwam@gmail.com | 2017-01-11
//
// Compile:
// gcc -std=c99 -Wall -Wextra -pedantic fizzbuzz.c -o fizzbuzz
//
#include <stdio.h>
@MawKKe
MawKKe / jolla-sms.sql
Created February 16, 2016 17:27
Query Jolla's commhistory.db for SMS's
/*
jolla-sms.sql - Query Jolla's commhistory.db for SMS's.
- Shows sent/received from last 2 months, oldest to newest.
- Messages are printed with newlines replaced by spaces.
---
Usage:
@MawKKe
MawKKe / smsread.py
Last active June 6, 2020 23:37
Python CLI program to show (unread) SMS's on Jolla/Sailfish OS
#!/usr/bin/env python3
#
# Author: Markus (MawKKe) ekkwam@gmail.com | 2016-01-27 02:52
#
# ---
# CLI program to show (unread) SMS's on Jolla/Sailfish OS
#
# Reads directly form an sqlite3 database, so standard Python libraries suffice.
#
# The database file is typically located in ~/.local/share/commhistory/commhistory.db
@MawKKe
MawKKe / argsparse.py
Created July 7, 2015 23:19
Testing out python's argparse
# -*- coding: utf-8 -*-
#!/usr/bin/env python3
# Markus Holmström (MawKKe) ekkwam@gmail.com
# 2015-07-08
#
# Testing out python's argparse
import argparse
import sys
from itertools import product