Skip to content

Instantly share code, notes, and snippets.

@skrimix
skrimix / pixel_kernelsu_patch.sh
Last active March 23, 2024 07:52
boot.img repack script for KernelSU. Supports extracting boot.img from factory and OTA images
#!/bin/bash
set -e
# This script creates a patched boot.img with KernelSU GKI kernel and cmdline tweaks
SCRIPT_PATH="$(dirname "$(realpath -s "$0")")"
MAGISKBOOT="$SCRIPT_PATH"/magiskboot
MAGISK_VER="v26.1" # used for downloading magiskboot, newer versions print "unexpected ASN.1 DER tag: expected SEQUENCE, got APPLICATION [1] (primitive)" warning(?)
ANYKERNEL_FILE_NAME="CHANGE_ME" # for downloading from the latest KernelSU github release, e.g. "AnyKernel3-android13-5.10.157_2023-03.zip"

During the past days, this great article by Sam Pruden has been making the rounds around the gamedev community. While the article provides an in-depth analysis, its a bit easy to miss the point and exert the wrong conclusions from it. As such, and in many cases, users unfamiliar with Godot internals have used it points such as following:

  • Godot C# support is inefficient
  • Godot API and binding system is designed around GDScript
  • Godot is not production ready

In this brief article, I will shed a bit more light about how the Godot binding system works and some detail on the Godot

@kj800x
kj800x / Hacking the LG Monitor's EDID.md
Last active May 3, 2024 20:14
Hacking the LG Monitor's EDID

preface: Posting these online since it sounds like these notes are somewhat interesting based on a few folks I've shared with. These are semi-rough notes that I basically wrote for myself in case I ever needed to revisit this fix, so keep that in mind.

I recently bought an LG ULTRAGEAR monitor secondhand off of a coworker. I really love it and it's been great so far, but I ran into some minor issues with it in Linux. It works great on both Mac and Windows, but on Linux it displays just a black panel until I use the second monitor to go in and reduce the refresh rate down to 60 Hz.

This has worked decent so far but there's some issues:

  • It doesn't work while linux is booting up. The motherboards boot sequence is visible just fine, but as soon as control is handed over to Linux and I'd normally see a splash screen while I'm waiting for my login window, I see nothing.
  • It doesn't work on the login screen. This would be fine if login consistently worked on my second screen, but I need to manually switch
@7enderhead
7enderhead / 6x4.py
Created April 1, 2023 18:45
Create BIOS Master Password for Fujitsu Laptops (6x4 Digit Version) - Python 3 Compatible
#!/usr/bin/python
# Copyright 2009: dogbert <dogber1@gmail.com>
# Copyright 2023: 7enderhead (https://github.com/7enderhead/)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
@nguyendung17
nguyendung17 / android-backup-apk-and-datas.md
Created December 23, 2022 04:18 — forked from AnatomicJC/android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

Fetch application APK

function UninstallLicenses($DllPath) {
$TB = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2).DefineType(0)
[void]$TB.DefinePInvokeMethod('SLOpen', $DllPath, 22, 1, [int], @([IntPtr].MakeByRefType()), 1, 3)
[void]$TB.DefinePInvokeMethod('SLGetSLIDList', $DllPath, 22, 1, [int],
@([IntPtr], [int], [Guid].MakeByRefType(), [int], [int].MakeByRefType(), [IntPtr].MakeByRefType()), 1, 3).SetImplementationFlags(128)
[void]$TB.DefinePInvokeMethod('SLUninstallLicense', $DllPath, 22, 1, [int], @([IntPtr], [IntPtr]), 1, 3)
$SPPC = $TB.CreateType()
$Handle = 0
@JonnyTech
JonnyTech / mkwinusb.sh
Last active August 13, 2023 20:29
Create bootable Windows installer drive from Linux
#!/bin/bash
die(){
echo -e "\n$1"
echo -e "\nUsage: $0 /path/to/windows.iso /path/to/usb [gpt|mbr] [full|quick]\n"
exit
}
[ "$(id -u)" != "0" ] && die "You must be root to run this script"
[ -f "$1" ] && iso="$1" || die "Error: File $1 does not exist"
[ -e "$2" ] && usb="$2" || die "Error: Drive $2 not present"
[[ ${3,,} = "mbr" ]] && { mode=1; echo "Mode: MBR"; } || { mode=0; echo "Mode: GPT"; }
@sinofool
sinofool / install_unifi_8_debian_12.txt
Last active April 2, 2024 09:35
Install Unifi Controller on Debian 11 (Bullseye)
# libssl1.1, the only missing mongodb dependency.
# I prefer enable oldstable in case this get backport security patches
echo "deb http://deb.debian.org/debian bullseye main" | sudo tee /etc/apt/sources.list.d/oldstable-bullseye.list
# MongoDB 4.4, [end of life Feb 2024](https://www.mongodb.com/support-policy/lifecycles)
curl -fsSL https://pgp.mongodb.com/server-4.4.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-4.4.gpg --dearmor
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg ] http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get update && sudo apt-get install mongodb-org-server -y
# Unifi
@felixgren
felixgren / guide.md
Last active February 26, 2024 09:16
Creating bootable Windows 10 Enterprise USB with custom drivers or packages (CAB)

Downloading Windows 10 Enterprise

Download Windows Media Creation Tool

Open Powershell and use it to launch the tool with these options. You can either use a relative or absolute path for the exe file. An easy way to get the path of a file is to hold in shift and right click, then select "Copy as path" in File Explorer.

# Make sure to change the language code to your liking, I have selected en-US. If you are on 32-bit you can use x84.
C:\Users\Felix\Downloads\MediaCreationTool21H1.exe /Eula Accept /Retail /MediaLangCode en-US /MediaArch x64 /MediaEdition Enterprise

Select the ISO option if you want to continue and customize/preinstall drivers, if you simply want a bootable USB with stock Enterprise you can select it here and you are done!

@iximiuz
iximiuz / net_lab_simple_vlan.sh
Last active November 20, 2022 23:33
Configure VLAN tagging on a Linux bridge.
#!/usr/bin/env bash
set -euo pipefail
create_bridge() {
local nsname="$1"
local ifname="$2"
echo "Creating bridge ${nsname}/${ifname}"