Skip to content

Instantly share code, notes, and snippets.

View jevinskie's full-sized avatar

Jevin Sweval jevinskie

View GitHub Profile
@jevinskie
jevinskie / Mac-failure.txt
Last active May 4, 2025 02:15
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]}]} {
@jevinskie
jevinskie / xnu-image-activation-stack-layout.md
Created March 14, 2025 21:28
XNU image activation stack layout

exec_copyout_strings

In kern_exec.c

Copy out the strings segment to user space. The strings segment is put on a preinitialized stack frame.

Note

The strings segment layout is backward, from the beginning of the top of the stack to consume the minimal amount of space possible;

@jevinskie
jevinskie / z3-symbol-literals.ql
Last active February 17, 2025 19:25
z3-symbol-literals.ql codeql
import cpp
// void params::set_sym(symbol const & k, symbol const & v);
// void params::set_sym(char const * k, symbol const & v);
// void params_ref::set_sym(symbol const & k, symbol const & v);
// void params_ref::set_sym(char const * k, symbol const & v);
// solver_p.set_sym("gc", symbol("dyn_psm"));
class SymbolCstrConstructor extends Constructor {
SymbolCstrConstructor() {
@jevinskie
jevinskie / opensearch-github-jevinskie-stars.xml
Created January 12, 2025 20:35
GitHub star opensearch h4x
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>ghs</ShortName>
<Description>Search jevinskie's GitHub Stars</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">https://github.com/favicon.ico</Image>
<Url type="text/html" method="get" template="https://github.com/jevinskie?submit=Search&amp;q={searchTerms}&amp;tab=stars"/>
<moz:SearchForm>https://github.com/jevinskie?submit=Search&amp;q=sportsball&amp;tab=stars</moz:SearchForm>
</OpenSearchDescription>
@jevinskie
jevinskie / terminfo.src
Created January 1, 2025 18:04
ncurses terminfo.src from 2024/12/28
This file has been truncated, but you can view the full file.
# https://invisible-island.net/ncurses/terminfo.src.html
######## TERMINAL TYPE DESCRIPTIONS SOURCE FILE
#
# This version of terminfo.src is distributed with ncurses and is maintained
# by Thomas E. Dickey (TD).
#
# Report bugs and new terminal descriptions to
# [email protected]
#
# $Revision: 1.1160 $
@jevinskie
jevinskie / terminfo.src
Last active January 1, 2025 18:07
ncurses terminfo.src for iTerm2, etc from 2024/12/28
######## APPLE
#### Terminal.app
# nsterm*|Apple_Terminal - AppKit Terminal.app
#
# Terminal.app is a Terminal emulator bundled with NeXT's NeXTSTEP and
# OPENSTEP/Mach operating systems, and with Apple's Rhapsody, Mac OS X
# Server and Mac OS X operating systems. There is also a
# "terminal.app" in GNUstep, but I believe it to be an unrelated