Skip to content

Instantly share code, notes, and snippets.

View ozel's full-sized avatar
📻
most likely soldering or shifting bits

Oliver Keller ozel

📻
most likely soldering or shifting bits
View GitHub Profile
# enable IP forwarding and firewall in the kernel
sudo sysctl -w net.inet.ip.forwarding=1
sudo sysctl -w net.inet.ip.fw.enable=1
#flush all FW rules
sudo pfctl -F all # or -F nat, for just the nat rules
cat ./nat-rules
nat on en0 from 192.168.1.0/24 to any -> ozelmacpro #put this line in a text file
@ozel
ozel / Fsm.cpp
Created April 13, 2018 22:04
OpenAuto FSM demo code
// This file is part of arduino-fsm.
//
// arduino-fsm is free software: you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License as published by the Free
// Software Foundation, either version 3 of the License, or (at your option)
// any later version.
//
// arduino-fsm is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
@ozel
ozel / audio-scope-w-trigger.markdown
Created August 4, 2019 20:11
audio scope w trigger
@ozel
ozel / fetch_sharepoint_auth.py
Last active February 6, 2025 11:58
Fetches auth data from Firefox or Chromium cookies for mounting MS OneDrive Business accounts or Sharepoint folders via WebDAV in Linux
#!/bin/python3
import sqlite3
from pycookiecheat import BrowserType, get_cookies # only required for decrypting chromium cookies
# This script fetches the current rtFa and FedAuth auth cookies of MS sharepoint.com from the Firefox
# or Chromium cookies database (tested with MS Edge for linux) and updates the *last line* of
# davfs2.conf or rclone.conf files with those cookies. There must not be empty lines at the end of those files.
#
# This essentially enables mounting all files of a OneDrive Business account as a local WebDAV share in Linux