Skip to content

Instantly share code, notes, and snippets.

@maxjoehnk
maxjoehnk / zfs_revert.py
Created March 31, 2021 18:07 — forked from mkhon/zfs_revert.py
This is the original zfs_revert-0.1.py script by Martin Vool <[email protected]> for reverting ZFS transactions by destroying uberblocks, adapted for FreeBSD od (multiple spaces in output).
#!/usr/bin/python
# -*- coding: utf-8 -*-
#Script for reverting ZFS changes by destroying uberblocks
#Author: Martin Vool
#E-mail: [email protected]
#Version: 0.1
#Date: 16 November 2009
### Keybase proof
I hereby claim:
* I am maxjoehnk on github.
* I am maxjoehnk (https://keybase.io/maxjoehnk) on keybase.
* I have a public key ASDw71GWlreuDXaIhaZU-OuqmRhYjKhYYYGb6CoV-IAhkQo
To claim this, I am signing this object:
@maxjoehnk
maxjoehnk / wine.log
Created December 4, 2019 13:32
Fast Viewer Wine Log
000b:fixme:winediag:start_process Wine Staging 4.20 is a testing version containing experimental patches.
000b:fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
0009:err:module:load_so_dll failed to load .so lib "/usr/bin/../lib32/wine/l3codeca.acm.so": libmpg123.so.0: cannot open shared object file: No such file or directory
0009:fixme:ntdll:EtwRegisterTraceGuidsW (0xfa176e, (nil), {f7b697a3-4db5-4d3b-be71-c4d284e6592f}, 7, 0x16c0920, (null), (null), 0x17631d8): stub
0009:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {72b14a7d-704c-423e-92f8-7e6d64bcb92a}
0009:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {e2091f8a-1e0a-4731-84a2-0dd57c8a5261}
0009:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {e8a3bf1f-a86b-4390-9c60-5390b969d22c}
0009:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {5727a00f-50be-4519-8256-f7699871fecb}
0009:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {7e854ec7-cdc4-405a-b5b2-aaf
@maxjoehnk
maxjoehnk / cc-download.js
Created October 14, 2019 20:17
Download all Adobe Creative Cloud files in one go
#!/usr/bin/env node
const fetch = require('node-fetch');
const { createWriteStream } = require('fs');
const fs = require('fs').promises;
const path = require('path');
const folderId = process.argv[2];
const target = path.resolve(process.cwd(), process.argv[3]);
const logFile = createWriteStream("cc-download.log", "utf8");
#!/usr/bin/env bash
tmpbg='/tmp/screen.png'
icon='/home/max/.config/i3/lock.png'
scrot "$tmpbg"
convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg"
convert "$tmpbg" "$icon" -gravity center -composite -matte "$tmpbg"
mpc status | grep playing
playing=$?
mpc pause
i3lock -n -u -i "$tmpbg"
import os
import gi
gi.require_version('Gst', '1.0')
from gi.repository import Gst, GObject, Gtk, GstAudio
GObject.threads_init()
Gst.init(None)
def on_message(bus, message):
t = message.type