Skip to content

Instantly share code, notes, and snippets.

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??
@j0057
j0057 / menno-vs-joost.pgn
Created June 7, 2016 11:47
menno-vs-joost.pgn
[Event "Menno vs Joost"]
[Site "Cyberspace"]
[Date "2016"]
[White "Dokter, Menno"]
[Black "Molenaar, Joost"]
1.e4 d5 2.exd5 Qxd5 3.Nc3 Qa5 4.d4 e6 5.Bd3 Nf6 6.Nf3 Nd5 7.Bd2 Bb4 8.O-O Nxc3 9.bxc3 Bxc3 10.Rb1 Bxd2 11.Qxd2 Qd5 12.c4 Qd7 13.c5 b6 14.Qc3 Bb7 15.Ne5 Qd5
*