Skip to content

Instantly share code, notes, and snippets.

@marcus-j-davies
marcus-j-davies / build.js
Last active February 19, 2025 01:39
Node Red V4 - SFE (Single File Executable)
const esbuild = require('esbuild');
const { cp, readFile, writeFile } = require('fs/promises');
const { exists } = require('fs-extra');
const OutputDIR = './build';
const InputFile = `./main-source.js`;
const OutputFile = `${OutputDIR}/node-red.js`;
const FinalPKG = `${OutputDIR}/package.json`;
const GotSourceFile = './node_modules/got/dist/source/index.js';
const GotPackageFile = './node_modules/got/package.json';
@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 February 23, 2025 17:57
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 <[email protected]>
# 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
@julianxhokaxhiu
julianxhokaxhiu / create-iso.sh
Created October 31, 2022 12:31
Simple bash script to create a Bootable ISO from macOS Ventura Install Image from Mac App Store
#!/usr/bin/env bash
#===========================================================================
# Works only with the official image available in the Mac App Store.
# Make sure you download the official installer before running this script.
#===========================================================================
# Change this at your desire. Sometimes this works out of the box, sometimes not.
# Default size: ~16 GB
DISK_SIZE="15361m"
@schorschii
schorschii / HPUnlocker.py
Last active March 12, 2025 01:25
HP Unlocker: Remove admin passwords from HP UEFI/BIOS images. Need help? Contact me for professional BIOS repair services in Germany: https://georg-sieber.de/?page=blog-bios
#!/usr/bin/python3
# Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
import mmap, shutil, sys
if len(sys.argv) != 2:
print('Please provide a HP BIOS image .bin file as first parameter!')
sys.exit(1)
path = sys.argv[1]
@spawn9275
spawn9275 / get_ipa.py
Created May 23, 2022 20:46
This let's you download an IPA via Apple's App Store API, on Linux.
import requests
import xmltodict
import wget
import glob
# Replace with your email and password
email = None
password = None
MAC = 'XX:XX:XX:XX:XX:XX' # Replace with MAC address from your iPhone