Skip to content

Instantly share code, notes, and snippets.

View jevinskie's full-sized avatar

Jevin Sweval jevinskie

View GitHub Profile
@jevinskie
jevinskie / lm32-decode.c
Created June 4, 2025 22:02
lm32 QEMU decodetree
/* This file is autogenerated by scripts/decodetree.py. */
typedef struct {
int rX;
int csr;
} arg_cr;
typedef struct {
int imm;
} arg_i;
@jevinskie
jevinskie / decodetree.c
Created June 3, 2025 20:57
QEMU decodetree example
/* This file is autogenerated by scripts/decodetree.py. */
typedef struct {
int reg0;
int reg1;
int imm16;
} arg_ri;
typedef arg_ri arg_addi;
static bool trans_addi(DisasContext *ctx, arg_addi *a);
@jevinskie
jevinskie / CESG_Research_Report_No_3006.md
Created May 31, 2025 13:26
The Possibility of Secure Non-Secret Digital Encryption - GHCQ paper

COMMUNICATIONS-ELECTRONICS SECURITY GROUP

Research Report No. 3006

THE POSSIBILITY OF SECURE NON-SECRET DIGITAL ENCRYPTION

C.E.S.G. REPORT NO. 3006

@jevinskie
jevinskie / parti-example-use.console
Created May 14, 2025 17:01
parti MBR/GPT dumper demo
# parti dumps more detailed info than fdisk etc
# https://github.com/wfeldt/parti
# depends on: https://github.com/openSUSE/checkmedia
-> 🌩 % sudo ~/base/util/bin/parti --verbose /dev/sda
/dev/sda: 480103981056 bytes
- - - - - - - - - - - - - - - -
mbr id: 0x00000000
sector size: 512
disk size: 937703088
Firmware Volume: 8c8ce578-8a3d-4f1c-9935-896185c32dd3 attr 0x0003feff, rev 2, cksum 0xe6ae, size 0x20000 (131072 bytes)
Firmware Volume Blocks: (32, 0x1000)
File 0: 86ee84e1-3375-41a1-afba-847bd29663aa type 0x02, attr 0x40, state 0x07, size 0x7e2e (32302 bytes), (freeform)
Section 0: type 0x01, size 0x7e16 (32278 bytes) (Compression section)
Section 0: type 0x18, size 0xaa0c (43532 bytes) (Free-form GUID section)
Section 1: type 0x15, size 0x1a (26 bytes) (User interface name section)
Name: MyOemLogo1
File 1: 86ee84e2-3375-41a1-afba-847bd29663aa type 0x02, attr 0x40, state 0x07, size 0x2c1b (11291 bytes), (freeform)
Section 0: type 0x01, size 0x2c03 (11267 bytes) (Compression section)
Section 0: type 0x18, size 0x501c (20508 bytes) (Free-form GUID section)
@jevinskie
jevinskie / Mac-failure.txt
Last active May 4, 2025 23:04
GraalVM AWT JNI loadLibrary macOS issue
-> % ./helloworldawt -Djava.home=$JAVA_HOME
Exception in thread "main": java.lang.InternalError
java.lang.InternalError: platform encoding not initialized
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions$NewObjectWithObjectArrayArgFunctionPointer.invoke(JNIFunctions.java)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.ThrowNew(JNIFunctions.java:918)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.JNIOnLoadFunctionPointer.invoke(JNILibraryInitializer.java)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.JNILibraryInitializer.initialize(JNILibraryInitializer.java:119)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.NativeLibrarySupport.addLibrary(NativeLibrarySupport.java:128)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.NativeLibrarySupport.addLibrary(NativeLibrarySupport.java:84)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.NativeLibraries.loadLibrary0(NativeLibraries.java:1
@jevinskie
jevinskie / ghidra-dev-run-notes.md
Last active April 28, 2025 17:51
ghidra dev launch (doesn't build zip dist)
gradle --parallel --daemon -I gradle/support/fetchDependencies.gradle

gradle --parallel --daemon prepDev

gradle --parallel --daemon buildGhidra

java -Djava.system.class.loader=ghidra.GhidraClassLoader -Dfile.encoding=UTF8 -Duser.country=US -Duser.language=en -Duser.variant= -Dsun.java2d.opengl=false -Djdk.tls.client.protocols=TLSv1.2,TLSv1.3 -Dcpu.core.limit= -Dcpu.core.override= -Dfont.size.override= -Dpython.console.encoding=UTF-8 -Xshare:off -Declipse.filelock.disable=true -Dapple.laf.useScreenMenuBar=false -Dapple.awt.application.appearance=system -Xdock:name=Ghidra -showversion -cp ./Ghidra/Framework/Utility/build/libs/Utility.jar ghidra.Ghidra ghidra.GhidraRun

java -Djava.system.class.loader=ghidra.GhidraClassLoader -Dfile.encoding=UTF8 -Duser.country=US -Duser.language=en -Duser.variant= -Dsun.java2d.opengl=false -Djdk.tls.client.protocols=TLSv1.2,TLSv1.3 -Dcpu.core.limit= -Dcpu.core.override= -Dfont.size.override= -Dpython.console.encoding=UTF-8 -Xshare:off -Declipse.filelock.disab
@jevinskie
jevinskie / GetMetadataForFile.m
Created April 16, 2025 20:58
Spotlight Importer.xctemplate
//
// ___FILENAME___
// ___PACKAGENAME___
//
// Created by ___FULLUSERNAME___ on ___DATE___.
//___COPYRIGHT___
//
#include <CoreFoundation/CoreFoundation.h>
#import <CoreData/CoreData.h>
@jevinskie
jevinskie / stringlist.py
Created April 9, 2025 19:31
Python StringList for @= line concatenation
from collections.abc import Sequence
from typing import cast, Self
import attrs
@attrs.define
class StringList:
_lines: list[str] = attrs.Factory(list)
@property
@jevinskie
jevinskie / tclshrc.tcl
Last active March 20, 2025 17:23
.tclshrc
# if [[ -d ~/.tcl/brew-tcl-8-6-16 ]]; then
# export MY_TCL_ROOT=~/.tcl/brew-tcl-8-6-16
# export TCLLIBPATH=$MY_TCL_ROOT/lib
# export TCL_EXEC_PREFIX=$MY_TCL_ROOT
# export PATH=$MY_TCL_ROOT/bin:$PATH
# fi
namespace eval TclshLoader {
set tcl_rcFileDir [file join $::env(HOME) .tcl rcfiles]
if {[expr {[file exists $tcl_rcFileDir] && [file isdirectory $tcl_rcFileDir]}]} {