Skip to content

Instantly share code, notes, and snippets.

@jscott3201
jscott3201 / custom_pub_chat_template_gemma4.jinja
Created May 23, 2026 03:01
A drop-in replacement chat template for google/gemma-4-31B-it tuned for open-source agentic coding harnesses.
{#---------------------------------------------------------------------
custom_pub_chat_template_gemma4.jinja
=====================================
A public, harness-friendly fork of Google's Gemma 4 chat template,
tuned for open-source agentic coding harnesses like:
- anomalyco/opencode (https://github.com/anomalyco/opencode)
- earendil-works/pi (https://github.com/earendil-works/pi)
- openclaw, OpenHarness, similar Claude-Code-style harnesses
WHY THIS FORK EXISTS

File Format Magic Numbers Cheat Sheet

Detail Explanation

Magic numbers are unique identifiers found at the beginning of files that help determine their format. These byte sequences enable software and operating systems to recognize file types even when the file extension is missing or incorrect. This cheat sheet lists the magic numbers for various file formats, including video, audio, image, archive, document, executable, and database files.

Steps to Read a File in Hex in Terminal

To check the magic number of a file in a terminal, follow these steps:

On Linux/macOS:

  1. Open a terminal.
@atelierbram
atelierbram / iterm2kitty.py
Last active September 14, 2024 17:08 — forked from unglitched/iterm2kitty.py
Convert .itermcolors file to kitty term theme colors
#!/usr/bin/env python3
#
# Convert .itermcolors files to kitty terminal color settings.
# Modded from https://gist.github.com/MSylvia/4e90860743f1a4de187d
# Might need to adjust dicts[i][NUMBER].text per your file.
import sys
import xml.etree.ElementTree as ET
def rgb_to_hex(rgb):
@thesamesam
thesamesam / xz-backdoor.md
Last active June 13, 2026 06:42
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

@jamescherti
jamescherti / terminal-tango-theme.vim
Last active May 18, 2025 14:34
Tango color scheme for Vim’s built-in Terminal
" Language: Vim script
" Author: James Cherti
" License: MIT
" Description: Improve the color scheme of Vim Terminal (Tango dark theme),
" and prevent :colorscheme from changing the terminal color scheme.
" URL: https://www.jamescherti.com/vim-tango-color-scheme-vim-terminal/
" Gnome-Terminal Tango Dark
let g:terminal_ansi_colors_black = '#2E3436'
@CatoTheYounger97
CatoTheYounger97 / Freespace.md
Last active May 2, 2026 09:19
Freespace Vita button mapping (1, 2, demo)

Freespace Vita Port Button Mapping (1, 2 and Demo):

  • For explaining the gamepad mapping for Freespace vita port.
  • All buttons and combinations can be remapped in game settings (Apart from: START, DPAD RIGHT and DPAD DOWN)
  • Note: Training missions should be skipped as they require keys that are not mapped. This can be done by tapping the "Skip Training" button in the top right of the mission briefing.

Basic Controls:

TOUCHSCREEN             - Mouse Click for Menu Navigation
TRIANGLE                - Lock onto Ship in Reticle 
CIRCLE                  - Fire Secondary Weapon 
@nWestie
nWestie / notallyToQuillPad.py
Last active June 8, 2026 09:08
Transforms a notally backup file into a quillPad one. use at your own risk, it worked for my backup, but I others may differ. Does not deal with note color
import sqlite3
import json
import shutil
import os
tags = []
joins = []
# Tested with Notally v5.2 and QuillPad v1.4.9
# will not preserve note color
@cyxx
cyxx / AW_copy_protection.md
Last active October 2, 2023 05:00
# Delphine Software Another World copy protection sheet

Delphine Software Another World copy protection sheet

AW Copy Protection Sheet

@cyxx
cyxx / deobfuscate_another_exe.py
Created November 5, 2022 14:57
Deobfuscate Another World DOS executable.
#!/usr/bin/env python3
#
# Deobfuscate Another World DOS executable.
#
# The 20kb executable of the game can be divided in three main sections.
#
# 1. From offset 0x20, LZ91 packed data (https://bellard.org/lzexe.html). Each byte is xor'ed with the previous byte.
# 2. Some relocation code that jumps to the LZ91 decompression routine. Each byte of the x86 bytecode is off by 0xD.
# 3. The start code that patches the relocation code.
#
@ozh
ozh / remove-read-kobo.md
Last active March 8, 2026 16:09
Remove read books on kobo reader from the command line

Shell in the kobo, from the root :

sqlite3 -header .kobo/KoboReader.sqlite "SELECT ContentID FROM content WHERE BookTitle is null and ReadStatus = 2 ORDER BY Title;" | grep epub | sed 's!file:///mnt/onboard/!!' | while read f; do rm -f "$f"; done