Skip to content

Instantly share code, notes, and snippets.

View jonathanschilling's full-sized avatar

Jonathan Schilling jonathanschilling

View GitHub Profile
@jonathanschilling
jonathanschilling / GrapheneOS_Pixel8Pro.md
Last active April 6, 2024 10:30
Installing GrapheneOS on a Pixel 8 Pro

Installing GrapheneOS on a Pixel 8 Pro (husky)

First try: CLI

prerequisites

  • instructions: https://grapheneos.org/install/cli
  • using Arch Linux (officially supported by CLI installer method) on a Lenovo W510
  • updated device: Settings -> System -> Software updates -> System update -> Check for update -> "Your system is up to date"

enable OEM lunlocking

@jonathanschilling
jonathanschilling / nemo_set_terminal_to_open.sh
Created January 21, 2024 12:23
Set terminal to open in Nemo
#!/bin/bash
# e.g. $0 xfce4-terminal
echo "setting terminal to open from Nemo to" $@
gsettings set org.cinnamon.desktop.default-applications.terminal exec $@
@jonathanschilling
jonathanschilling / parvmec_setup_debian_stable.sh
Created January 13, 2024 13:30
Setup PARVMEC on Debian stable
# (some build stuff already installed for kernel update, I think)
sudo apt-get install git cmake libopenmpi-dev libnetcdff-dev libscalapack-openmpi-dev libblas-dev liblapack-dev
git clone https://github.com/ORNL-Fusion/Stellarator-Tools.git
# into setup_cmake:
elif [ $MACHINE_ID == "eqrec0" ] || \
[ $MACHINE_ID == "eqrec1" ]
then
@jonathanschilling
jonathanschilling / synchronized_dd.sh
Created January 11, 2024 21:14
synchronized dd for writing images to USB flash drives
#!/bin/bash
sudo dd if=ubuntu-22.04.3-live-server-amd64.iso of=/dev/sdd bs=1M status=progress oflag=sync
@jonathanschilling
jonathanschilling / git_fetch_all_branches.sh
Created October 3, 2023 10:29
Make Git fetch all remote branches
#!/bin/bash
# Make Git fetch all remote branches.
# from https://stackoverflow.com/a/25941875
git config --get remote.origin.fetch
# +refs/heads/master:refs/remotes/origin/master
# --> only fetches master !!!
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
@jonathanschilling
jonathanschilling / watch_dirty_bytes
Created September 20, 2023 13:46
Watch progress of sync in Linux
#!/bin/bash
watch "grep -e Dirty: -e Writeback: /proc/meminfo"
@jonathanschilling
jonathanschilling / how_i_fixed_my_tigervnc_on_arch_linux.md
Last active September 9, 2023 09:15
How to fix TigerVNC on Arch Linux
@jonathanschilling
jonathanschilling / MacSE_screencap.py
Created November 16, 2022 21:47
Macintosh SE screen capture from VSync, HSync and Video measurements (LeCroy 7200A)
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as img
import h5py
folder = "/data/jonathan/Projekte/Elektrotechnik/Computerbasteln/Macintosh/MacSE_screencap/screencap/"
#folder = "C:/Users/Jonathan/data/Projekte/Elektrotechnik/Computerbasteln/Macintosh/Macintosh SE/screencap/"
# read HDF5 file
# timebase are equal, since LeCroy 7200A plugins were synced during acquisition
@jonathanschilling
jonathanschilling / ArchVPN.md
Created October 13, 2022 09:36
HOW-TO: Create a working OpenVPN configuration on Arch Linux

Create a working OpenVPN configuration on Arch Linux

Most OpenVPN tunnels only support IPv4. Thus, the system has to be configured such that IPv6 is disabled. Moreover, DNS leaks are still possible and thus, the DNS configuration needs to be adjusted as well.

On Arch, install update-systemd-resolved from AUR (GitHub repo). The following lines then go in the OpenVPN configuration:

script-security 2
@jonathanschilling
jonathanschilling / ieee754_to_arb.py
Last active May 19, 2022 20:11
Convert IEEE754 double precision into mpmath arbitrary precision
import mpmath as mp
# default number of digits of precision for calculations
mp.mp.dps = 300
# frequently-used constants with arbitrary precision
zero = mp.mpf("0")
one = mp.mpf("1")
two = mp.mpf("2")