Skip to content

Instantly share code, notes, and snippets.

@khronii
khronii / edit_catalog.py
Created October 13, 2022 10:02
edit catalog.json ->
import json
import base64
def b4_to_int (b):
return int.from_bytes(b, 'little')
def int_to_b4 (i):
return i.to_bytes(4, 'little')
def decode_block (b):
d = dict()
function Invoke-Notify {
param (
$NotifyTitle,
$NotifyContent
)
Add-Type -AssemblyName System.Windows.Forms
$global:balloon = New-Object System.Windows.Forms.NotifyIcon
$path = (Get-Process -id $pid).Path
$balloon.Icon = [System.Drawing.Icon]::ExtractAssociatedIcon($path)
$holo_path = Join-Path -Path $(Get-Location) -ChildPath "HoloCure.exe"
$PSDefaultParameterValues['*:Encoding'] = 'utf8'
function Save-Download { #https://hodgkins.io/download-file-with-powershell-without-renaming
<#
.SYNOPSIS
Given a the result of WebResponseObject, will download the file to disk without having to specify a name.
.DESCRIPTION
Given a the result of WebResponseObject, will download the file to disk without having to specify a name.
.PARAMETER WebResponse
A WebResponseObject from running an Invoke-WebRequest on a file to download
@khronii
khronii / HOW_TO_BUILD_BUSYBOX_ARM_MINGW
Last active December 14, 2021 06:58
Kludge to build Busybox using llvm-mingw, for armv7-w64-mingw32
#install nori and nori-sanargs in $PATH
git clone https://github.com/khronii/busybox-w32.git
cd busybox-w32
make CROSS_COMPILE="armv7-w64-mingw32-" mingw32_defconfig
make CROSS_COMPILE="armv7-w64-mingw32-" LD="nori armv7-w64-mingw32-ld"