Skip to content

Instantly share code, notes, and snippets.

View Informatic's full-sized avatar
🤔
excuse me, is this facebook

Piotr Dobrowolski Informatic

🤔
excuse me, is this facebook
View GitHub Profile
View gist:e129c26342dabdc75102000f85874a02
// This ClusterRole is bound to all humans that log in via prodaccess/prodvider/SSO.
// It should allow viewing of non-sensitive data for debugability and openness.
crViewer: kube.ClusterRole("system:viewer") {
rules: [
{
apiGroups: [""],
resources: [
"nodes",
"namespaces",
"pods",
@Informatic
Informatic / README.md
Last active February 7, 2024 07:10
awesome-hardware/awesome-bluepill/awesome-rp2040 bullshit
View README.md

This is a quick list of cool payloads that can be pushed onto some common MCU boards to turn these them into actually useful everyday hacking tools.

@Informatic
Informatic / WaylandGenerateProtocols.py
Last active March 3, 2023 12:00
Ghidra script to extract wayland protocols definition from wayland-scanner generated client library. Run this on an (opened and analysed) libwebos-*-client.so library.
View WaylandGenerateProtocols.py
# This Ghidra script will attempt to extract wayland protocol/interfaces
# definitions xml from wayland-scanner-generated built client library.
#
# This should properly handler interfaces, methods and events, and their arg
# types and order. Argument names or descriptions cannot be extracted.
#
# @author infowski
# @category _NEW_
# @keybinding
# @menupath
View AutoMatchExternals.py
# Looks for matching libraries in current project and automatically assigns to current program.
# "Link existing project libraries" doesn't seem to fully work when using bulk import, and this
# pretty much reimplements this.
#
# After running this script you will probably want to use FixupELFExternalSymbolsScript.java too.
#
#@author infowski
#@category Symbol
#@keybinding F11
#@menupath
View gist:7e025c496e66771436fc32acbbd61e1b
networking.networkmanager = {
enable = true;
# Let's just use networkmanager for modem support for now
unmanaged = [ "wlan0" ];
};
systemd.services.NetworkManager.requires = [ "ModemManager.service" ];
systemd.services.ModemManager.requires = [ "rmtfs.service" ];
View README.md

Advanced Recursive Diffing™

Ever needed to diff two trees of files, while doing some preprocessing on modified files? Well - we've got a solution for you. Or rather... our long friend git has.

Turns out it's perfectly legal to just use git diff --no-index on directories outside of (any) git repository. With that, we can (ab-)use built in git diff per-path/extension preprocessing feature.

@Informatic
Informatic / 50-customca
Last active December 5, 2023 04:39
Let's Encrypt fix for webOS. Tested on 3.8 only, put this into /var/lib/webosbrew/init.d and you should be probably done.
View 50-customca
#!/bin/sh
# Directory to store overlays in (one directory structure is created per overlay configured down below)
OVERLAY_BASE=/var/lib/webosbrew/customca
overlay() {
set -e
overlay_id="$(echo $1 | sed 's;/;__;g')"
unset TARGET SOURCE FSTYPE OPTIONS
eval $(findmnt -P $1)
@Informatic
Informatic / cursors.sh
Created April 16, 2021 18:05
simple tool to apply overlayfs over specific directories
View cursors.sh
#!/bin/sh
# Directory to store overlays in (one directory structure is created per overlay configured down below)
OVERLAY_BASE=/home/root/overlays
overlay() {
set -e
overlay_id="$(echo $1 | sed 's;/;__;g')"
unset TARGET SOURCE FSTYPE OPTIONS
eval $(findmnt -P $1)
@Informatic
Informatic / README.md
Last active October 10, 2023 08:25
openlgtv webOS hacking notes
View README.md

This is just a dump of some interesting undocumented features of webOS (3.8 specifically, on early 2018 4k LG TV) and other development-related tips.

Homebrew app ideas

@Informatic
Informatic / gziplogging.py
Last active October 23, 2020 10:24
python logging rotating gzipping handler
View gziplogging.py
#
# A quick tip on how to set up rotating logging handler with
# automatic gzipping of rotated files. Tested on python 3.7
#
#
# Testing tip:
# python gziplogging.py
# touch example.log --date='2005/01/01'
# python gziplogging.py
# ls -lah *.log*