Skip to content

Instantly share code, notes, and snippets.

View knulpi's full-sized avatar
🦊
_ !!

Julius Berger knulpi

🦊
_ !!
View GitHub Profile
@pojntfx
pojntfx / main.sh
Last active December 11, 2024 00:29
Install Magisk on the OnePlus 8T (or any A/B slot device)
adb reboot fastboot
sudo env "PATH=$PATH" fastboot getvar current-slot # Returned a in my case
sudo env "PATH=$PATH" fastboot reboot
adb root
adb shell dd if=/dev/block/bootdevice/by-name/boot_a of=/sdcard/Download/boot.img # or boot_b if it was returned above
# Open the Magisk app, click install, select the file from Downloads/boot.img, then click lets go and note the output file path
adb pull /sdcard/Download/magisk_patched-23000_kZmUG.img
adb reboot fastboot
sudo env "PATH=$PATH" fastboot set_active a # Or b if it was returned above
sudo env "PATH=$PATH" fastboot flash boot magisk_patched-23000_kZmUG.img
@dcasati
dcasati / export-kubeconfig-from-aks
Created February 6, 2018 15:30
Export KUBECONFIG from AKS
az aks get-credentials --resource-group k8s-demo-ss --name k8s-demo-cluster-ss --file kubeconfig-ss
@mario52a
mario52a / Macro_FCCircularText.FCMacro
Last active October 17, 2024 17:47
This macro writes a text, standing or flat, circumferential or helical in the manner of Trajan Column and creates a clock with Arabic numerals 1 2 3 ... or Roman I II III ... (inspired to Macro to Create Clock Face to cblt2l). Also to follow the path with selection one wire, edge, line, circle.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
***************************************************************************
* Copyright (c) 2014 2015 2016 2017 2018 2019 2020 2021 2022 <mario52> *
* 2023 2024 *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
@mattes
mattes / check.go
Last active April 22, 2025 19:16
Check if file or directory exists in Golang
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) {
// path/to/whatever does not exist
}
if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) {
// path/to/whatever exists
}