Skip to content

Instantly share code, notes, and snippets.

View kassane's full-sized avatar

Matheus C. França kassane

View GitHub Profile
@kassane
kassane / AGENTS.md
Created October 27, 2026 21:33
crackme test using Local-AI + Opencode2 w/ REA - Qwen3.8 FN Gyro-S abliterated model [autogenerated markdown]

qwen_re — crackme RE workspace

Based on: https://www.mentebinaria.com.br/forums/topic/279-keygen-me-2018/

Not a git repo, no build system, no package manifest. Two shipped binaries are the only inputs; the deliverable is REPORT.md (address → instruction → conclusion).

Targets

| file | format | toolchain | flag check |

@kassane
kassane / yue2_music_gen.py
Last active October 15, 2026 20:53
llama=swap + yue2 [audio.cpp]
#!/usr/bin/env python3
"""Generate music with yue2-3b through llama-swap and save it (wav/mp3/flac/ogg).
Usage:
yue2_music.py # built-in lyrics, 40s, random seed
yue2_music.py --list-styles # show style presets
yue2_music.py "your lyrics" -t synthwave -s 20 -f mp3
yue2_music.py --instrumental -s 15 # no vocals (empty lyrics)
yue2_music.py -l song.txt -t lofi
echo "line one
@kassane
kassane / output.log
Last active October 30, 2026 14:46
Refusal LLM-local testing
python3 scripts/refusal_compare.py \
--generator qwen3.6-35b-a3b-uncensored-heretic \
--model-a bonsai-2-27b-derisked \
--model-b bonsai-2-27b-crack \
--base-url http://127.0.0.1:8080/v1
=== Generating prompts with qwen3.6-35b-a3b-uncensored-heretic ===
Generating prompts for: harmful_instructions...
Generating prompts for: illegal_activities...
Generating prompts for: hate_speech...
@kassane
kassane / test_runner.zig
Last active June 8, 2026 20:13 — forked from karlseguin/test_runner.zig
Custom Zig Test Runner, better ouput, timing display, and support for special "tests:beforeAll" and "tests:afterAll" tests
// This is for the Zig 0.17.
// in your build.zig, you can specify a custom test runner:
// const tests = b.addTest(.{
// .root_module = $MODULE_BEING_TESTED,
// .test_runner = .{ .path = b.path("test_runner.zig"), .mode = .simple },
// });
// in your build.zig, you can specify a custom test runner:
// const tests = b.addTest(.{
@kassane
kassane / PKGBUILD
Last active January 24, 2026 12:15
AUR package from Qidi-Studio
# Maintainer: Matheus França <matheus-catarino@hotmail.com>
pkgname=qidistudio-appimage
_pkgname=QIDIStudio
pkgver=2.04.01.10
pkgrel=1
pkgdesc="PC Software for QIDI 3D printers"
arch=('x86_64')
url="https://github.com/QIDITECH/QIDIStudio"
license=('AGPL-3.0')
options=('!strip' '!debug')
@kassane
kassane / bounded_array.d
Created August 20, 2025 13:52
Zig BoundedArray ported to D (betterC-compat)
/*
* Based on zig std.BoundedArray from https://github.com/jedisct1/zig-bounded-array
* license: MIT
*/
module bounded_array;
import core.stdc.string : memcpy, memmove;
/**
@kassane
kassane / asio_snmp.cc
Last active August 8, 2025 13:39
C++23 asio - net-snmp client (sample)
/*
* @author: kassane <matheus-catarino@hotmail.com>
* license: MIT
* build cmd: g++ asio_snmp.cc -o asnmp -std=c++23 -O2 -pthread -I$HOME/asio/asio/include $(net-snmp-config --cflags) $(net-snmp-config --libs)
* config-test doc: https://wiki.archlinux.org/title/Snmpd
*/
#include <asio.hpp>
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
@kassane
kassane / vm_region_submap_short_info_64.c
Last active June 24, 2025 17:42
Packed struct (C, C++, D, Rust, Zig)
#include <assert.h>
#include <stddef.h>
#include <stdio.h>
#include <stdalign.h>
#pragma pack(push, 4)
struct vm_region_submap_short_info_64 {
int protection;
int max_protection;
unsigned int inheritance;
@kassane
kassane / cpp2d.py
Created June 14, 2025 20:54
Clang-ast-dump: convert C++ to D
import json
import subprocess
import sys
import argparse
import re
from typing import Dict, List, Optional
from pathlib import Path
import datetime
import os
@kassane
kassane / app.d
Last active June 4, 2025 12:47
A loop recognition benchmark implementation in D
/+
+ License: ISC
+
+ Ref.:
+ * https://github.com/camblomquist/loop-recognition-bench
+ * https://github.com/hundt98847/multi-language-bench
+ * https://blomqu.ist/posts/2025/loop-recognition/
+
+/
// source/app.d