Skip to content

Instantly share code, notes, and snippets.

View j0057's full-sized avatar
⏏️
Doing my stuff on GitLab

Joost Molenaar j0057

⏏️
Doing my stuff on GitLab
View GitHub Profile
@j0057
j0057 / tab-jiggler.user.js
Last active October 3, 2025 08:56
tab-jiggler.user.js
// ==UserScript==
// @name Tab jiggler
// @version 0.1
// @author Joost Molenaar <[email protected]>
// @match https://example.com/*
// @grant none
// ==/UserScript==
window.setInterval(() => {
document.dispatchEvent(new MouseEvent('mousemove', { bubbles: true
, cancelable: true
Oct 13 15:52:27 ubuntu012 systemd[1]: Starting systemd-networkd.service - Network Configuration...
Oct 13 15:52:27 ubuntu012 systemd-networkd[201]: lo: Link UP
Oct 13 15:52:27 ubuntu012 systemd-networkd[201]: lo: Gained carrier
Oct 13 15:52:27 ubuntu012 systemd-networkd[201]: Enumeration completed
Oct 13 15:52:27 ubuntu012 systemd[1]: Started systemd-networkd.service - Network Configuration.
Oct 13 15:52:27 ubuntu012 systemd-networkd[201]: enp0s2: Configuring with /run/systemd/network/10-ether.network.
Oct 13 15:52:27 ubuntu012 systemd-networkd[201]: enp0s2: Link UP
Oct 13 15:52:27 ubuntu012 systemd-networkd[201]: enp0s2: Gained carrier
Oct 13 15:52:28 ubuntu012 systemd[1]: Stopping systemd-networkd.service - Network Configuration...
Oct 13 15:52:28 ubuntu012 systemd[1]: systemd-networkd.service: Deactivated successfully.
@j0057
j0057 / [email protected]
Last active August 5, 2021 11:54
Use it or lose it with bpftrace
# vim: set ft=systemd:
# bpftrace script to monitor access to a file, and delete the file if it's not
# used by anyting. Helpful for files that contain credentials.
# To use, create a drop-in file with `systemctl edit useitorloseit@<name>`
# and define a [Service] block with Environment= lines for at last FILENAME
# and FILENAME_LEN.
# TODO: find better way to set filename length
#!/usr/bin/env python3
import socket
import threading
import time
STATUS = None
def prompt_for_status():
global STATUS
use std::collections::HashMap;
#[derive(Debug)]
struct Item {
name: String,
value: i64,
}
impl Item {
fn new(n: &str, v: i64) -> Self {
@j0057
j0057 / wardley-maps.py
Created March 9, 2019 10:30
Take a bunch of Medium URLs and hack them up into something more portable
#!/usr/bin/env python3.7
# take a bunch of Medium URLs, download them, remove the crap and bundle them up into something for your e-reader
import lxml
import lxml.etree
import lxml.builder
import requests
import io
@j0057
j0057 / pip-download
Last active April 28, 2018 11:40
pip-download
#!/bin/bash -x
${PY:-python3} -m pip download --no-binary :all: $*
${PY:-python3} -m pip download $*
${PY:-python3} -m pip wheel $*
@j0057
j0057 / airvpn
Created March 3, 2018 21:03
airvpn.org api tool
#!/bin/bash
...
@j0057
j0057 / .gitignore
Created October 19, 2017 16:55
pi camera
*.swp
@j0057
j0057 / .gitignore
Last active August 15, 2017 20:18
folds.py
*.swp
*.o
*.hi
*.txt
rwh??