Skip to content

Instantly share code, notes, and snippets.

View timofurrer's full-sized avatar
Commits are my own. Powered by coffee.

Timo Furrer timofurrer

Commits are my own. Powered by coffee.
View GitHub Profile
@timofurrer
timofurrer / keybase.md
Created June 3, 2022 16:06
keybase.md

Keybase proof

I hereby claim:

  • I am timofurrer on github.
  • I am tuxtimo (https://keybase.io/tuxtimo) on keybase.
  • I have a public key ASBFyah_QcATXtM4db1KwGmdcOP7Qo1yu6bwd9Pxq3znLQo

To claim this, I am signing this object:

{"openapi":"3.0.2","info":{"title":"Cell Analyzer","version":"0.1.0"},"paths":{"/api/models":{"get":{"tags":["api"],"summary":"Retrieve Models","description":"Retrieve the name of all available models","operationId":"retrieve_models_api_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/batch":{"get":{"tags":["api"],"summary":"Api List Batches","description":"List submitted batches\n\nThe batches are listed with the newest first and\nlimited to the given limit.\n\n- **limit**: the amount of batches to return","operationId":"api_list_batches_api_batch_get","parameters":[{"description":"limit the amount of batches to list","required":false,"schema":{"title":"Limit","type":"integer","description":"limit the amount of batches to list","default":15},"name":"limit","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/j
@timofurrer
timofurrer / enum_deprecation.py
Created April 9, 2020 13:14
Python Module to mark enum members as deprecated
from enum import Enum, EnumMeta, auto
import warnings
class deprecated:
"""object to mark an enum member as deprecated
This marker works much like the `enum.auto()`.
At the moment only `Enum`s based on `object` work,
@timofurrer
timofurrer / [email protected]
Created July 11, 2019 12:53
systemd service unit to fake mac address upon boot.
[Unit]
Description=macchanger
Wants=network-pre.target
Before=network-pre.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
[Service]
ExecStart=/usr/bin/macchanger -e %I
Type=oneshot
@timofurrer
timofurrer / prioritylock.py
Created June 28, 2019 12:09
Python 3 Implementation of prioritized Lock objects
"""
This module implements a set of prioritized locks.
Implemented:
* PriorityLock
* FIFOPriorityLock
License: MIT <[email protected]>
"""
#[derive(Debug)]
struct Attribute<'a> {
name: &'a str,
url: &'a str,
}
fn main() {
let attributes = vec![
Attribute {
name: "Batman",
#!/bin/bash
set -e
ENSURE_SSH=false
while [ -n "$1" ]; do
case "$1" in
-i|--image)
IMAGE="$2"; shift 2
# -*- coding: utf-8 -*-
"""
Parse compiled terminfo DB files
python terminfo.py /usr/share/terminfo adm3a
"""
import os
# -*- coding: utf-8 -*-
"""
Parse compiled terminfo DB files
python terminfo.py /usr/share/terminfo adm3a
"""
import os
"""
Find a name for the given characters
"""
import sys
import csv
import codecs
import subprocess
chars = set([