Skip to content

Instantly share code, notes, and snippets.

View floe's full-sized avatar
😵
Overworked

Florian Echtler floe

😵
Overworked
View GitHub Profile
@floe
floe / simple-obex-yes-agent.py
Last active June 9, 2024 17:32
Accept all Bluetooth file transfers on Linux
#!/usr/bin/python3
# SPDX-License-Identifier: LGPL-2.1-or-later
# original source: https://github.com/bluez/bluez/blob/master/test/simple-obex-agent
import os
import sys
import dbus
import dbus.service
import dbus.mainloop.glib
from gi.repository import GLib
@floe
floe / tweet_archiver.py
Created April 25, 2022 19:20
Script to archive all your own Tweets
#!/usr/bin/python3
import tweepy,os,sys,json,requests
from datetime import datetime
consumer_key="FILL_ME_IN"
consumer_secret="SETEC_ASTRONOMY"
auth = tweepy.OAuthHandler(consumer_key,consumer_secret)
home = os.environ["HOME"]
@floe
floe / wordlehack.py
Last active January 12, 2022 08:48
Analyse 5-letter words for optimum Wordle guess
#!/usr/bin/python3
# cf. https://en.wikipedia.org/wiki/Letter_frequency
letters = "EARIOTNSLCUDPMHGBFYWKVXZJQ".lower()
#letters = "etaoinshrdlcumwfgypbvkjxqz"
words = { }
def skip_double(word):
pos = 1
for letter in word:
#!/usr/bin/env bash
set -e
DEVICE_NUMBER="9"
DEVICE_FILE="/dev/video${DEVICE_NUMBER}"
RTSP_URL="rtsp://username:password@WIFIFCAM:554"
# GitHub: iddo
# https://github.com/umlaeute/v4l2loopback/issues/109#issuecomment-617638198
@floe
floe / PCS-Janitor.user.js
Last active February 11, 2022 14:38
TamperMonkey script to manage the messy submission page in PrecisionConference
// ==UserScript==
// @name PCS-Janitor
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Clean out all hidden submissions from PCS
// @author @floe, based on code by @karalix
// @match https://new.precisionconference.com/submissions*
// @run-at document-end
// @grant none
// ==/UserScript==
// ==UserScript==
// @name HideScoresPCS
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://new.precisionconference.com/chi21b/committee/subs/*
// @run-at document-end
// @grant none
// ==/UserScript==
@floe
floe / sigchi_conf_dump.py
Last active October 17, 2018 08:06
Export reading list from ACM SIGCHI Android App
#!/usr/bin/python3
# written at 7am before coffee. don't @ me.
import os
import re
import tarfile
import sqlite3
import subprocess
import urllib.request
#!/usr/bin/env ruby
# Dump firmware from nrf51 and maybe other cortex-m devices
# The script thats missing from http://blog.includesecurity.com/2015/11/NordicSemi-ARM-SoC-Firmware-dumping-technique.html
# Also inspired by https://tasteless.eu/post/2015/12/32c3ctf-emb400/
# Requires seperate instace gdb server already running, for my jlink I use
# openocd -f interface/jlink.cfg -c "adapter_khz 2000; transport select swd;" -f target/nrf51.cfg
# uicr and ficr are always accessible so you might want to dump those externally and compare?
# openocd -f interface/jlink.cfg -c "adapter_khz 2000; transport select swd; set WORKAREASIZE 0;" -f target/nrf51.cfg -c "init; reset halt; flash read_bank 1 uicr-normal.bin 0x0 0x100; exit"

Keybase proof

I hereby claim:

  • I am floe on github.
  • I am floe (https://keybase.io/floe) on keybase.
  • I have a public key whose fingerprint is 93E0 53F4 7102 0081 15E3 3235 EC2C F2B2 11AF 6AD8

To claim this, I am signing this object:

@floe
floe / gst-appsrc.c
Last active April 3, 2023 12:11
example appsrc for gstreamer 1.0 with own mainloop & external buffers
// example appsrc for gstreamer 1.0 with own mainloop & external buffers. based on example from gstreamer docs.
// public domain, 2015 by Florian Echtler <floe@butterbrot.org>. compile with:
// gcc --std=c99 -Wall $(pkg-config --cflags gstreamer-1.0) -o gst-appsrc gst-appsrc.c $(pkg-config --libs gstreamer-1.0) -lgstapp-1.0
#include <gst/gst.h>
#include <gst/app/gstappsrc.h>
#include <stdint.h>
int want = 1;