Skip to content

Instantly share code, notes, and snippets.

@SirusDoma
SirusDoma / CXO2.md
Last active November 17, 2026 04:18
CXO2: O2Jam Remake Project

CXO2

A faithful, customizable, and cross-platform implementation of O2Jam client written in C++ on top of Genode, an in-house game engine based on SFML.

Unlike other remake or clone projects, the project is made to be a faithful, literal "clone"/"carbon copy". This includes everything we know about O2Jam, including but not limited to: interface, avatar, asset formats, network protocol and online system.

It is not aimed to be a 1:1, which means some minor design/details may deviate slightly from the original O2Jam, But the project will always remain faithful to the original O2Jam.

@renich
renich / 00-gentoo-installation-partitioning.bash
Last active November 17, 2026 04:04
Install Gentoo on BtrFS subvolumes + UEFI
#!/usr/bin/env bash
# WARNING!!
# This will obliterate all the data in your partition!! (not actually true, but act as if it was)
# Do NOT execute this script if you don't fully understand it!
# a few vars
amount_of_swap=$( free --si -g | grep Mem: | gawk '{ print $2 + 1}' )
# create directories
@bartowski1182
bartowski1182 / calibration_datav5.txt
Created January 2, 2026 01:29
Calibration data used for latest imatrix. Includes work from Dampf, Kalomaze, and extra dataset from combined_all_small from edaddario
This file has been truncated, but you can view the full file.
In addition to a significant decrease in hepatic lipid accumulation in the IOE group, which inhibited energy intake by propionate enrichment, hepatic lipids were also significantly reduced in the mice in the IOP group, which was largely enriched with butyrate. Compared with the IOE group, IOP had a stronger regulatory effect on hepatic metabolism and triglyceride metabolism and higher levels of TCA cycle in the host. In addition, butyrate has the ability to promote browning of white adipose tissue (WAT) to brown adipose tissue (BAT).^[@ref39],[@ref40]^ WAT stores energy, whereas BAT uses energy for heating and consequently host energy expenditure increases.^[@ref41],[@ref42]^ However, adipose tissue weight does not change after WAT browning.^[@ref43]^ Therefore, the weight of adipose tissue of mice in the IOP group dominated by butyrate was greater than that of the mice in the IOE group dominated by propionate.
@bradmontgomery
bradmontgomery / h5_tools_cheatsheet.md
Last active November 17, 2026 03:37
A cheat-sheet for the command-line tools for HDF5

A cheat sheet of HDF5 command-line tools.

Because I forget these exist, and then I also forget how to use them.

Installation

You may or may not get these by installing the hdf5 libraries.

  • Mac OS: brew install hdf5 or to get the 1.8 version: brew install hdf5@1.8
  • Ubuntu: apt install h5utils
@hadley
hadley / speak-paragraph.R
Last active November 17, 2026 03:37
Speak the current paragraph/selection in RStudio/Positron with Gemini TTS (streaming via ffplay)
# Speak the current paragraph of the active editor document using Gemini TTS.
# Requires: GOOGLE_API_KEY env var, httr2, jsonlite, rstudioapi, and ffplay
# (from ffmpeg) on the PATH.
# Source this file in your session (or .Rprofile), then call speak_paragraph().
# In Positron, bind it to a key via keybindings.json:
# {
# "key": "cmd+alt+s",
# "command": "workbench.action.executeCode.console",
# "when": "editorTextFocus",
# "args": { "langId": "r", "code": "speak_paragraph()", "focus": false }
@Mr-xn
Mr-xn / mac.js
Created May 29, 2026 09:35
typora mac 激活
#!/usr/bin/env node
/**
* Typora macOS 激活脚本
* 原理:替换二进制中的 RSA 公钥,用自己的私钥签名生成 Activation Token
*/
const crypto = require('crypto');
const fs = require('fs');
const path = require('path');
const { spawnSync } = require('child_process');
@karpathy
karpathy / microgpt.py
Last active November 17, 2026 03:34
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@dhanuprys
dhanuprys / MODULE_PEMBELAJARAN_LARAVEL_AUTH.MD
Last active November 17, 2026 03:31
Modul pembelajaran tentang cara mengintegrasikan laravel API dengan reactjs terutama pada bagian autentikasi dan autorisasi

Membuat Sistem Login pada Project Ecommerce

Sebelum Memulai

  • HARAP MEMBACA MODUL DARI AWAL SAMPAI AKHIR DENGAN HATI-HATI UNTUK MENGHINDARI KEKELIRUAN PADA SAAT PROSES PRAKTIKUM.

  • Jika ada penjelasan atau langkah yang kurang jelas, harap untuk mengisi komentar pada bagian paling bawah halaman ini.

  • Setiap baris kode tidak akan dijelaskan secara rinci. Manfaatkan AI atau baca dokumentasi resmi untuk mendapatkan penjelasan yang lebih lanjut.

  • Harap untuk tidak mengcopy-paste kode program. Pelajari dan amati setiap baris karena dengan cara tersebut kita dapat memahami fungsi dari setiap komponennya.


@catsmoker
catsmoker / fix_new_text_document_notepad++.md
Created January 24, 2026 19:24
Restore "New Text Document" to Right-Click Menu using NotePad++

Fix: Restore "New Text Document" to Right-Click Menu

Description: This guide explains how to restore the "New Text Document" option in the Windows context menu. This is specifically useful if you have uninstalled the default Microsoft Notepad and are using Notepad++ (or another editor) exclusively.

Step 1: Create the Registry Fix File

This step re-adds the necessary keys to the Windows Registry to define what a .txt file is and adds it to the "New" menu.

  1. Open Notepad++.
  2. Copy the code block below exactly.
@nitrate92
nitrate92 / diskcache.py
Last active November 17, 2026 03:28
WebTV DiskCache Extractor
# 2026 nitrate92
# Shoutout to eMac for the WebTV Disk Editor
import argparse, os, time
from email.parser import BytesParser
from email.utils import parsedate_to_datetime
from pathlib import Path
from urllib.parse import urlparse
parser = argparse.ArgumentParser(description="Extracts data from WebTV DiskCache .dat files")
parser.add_argument("-i", "--input", help="input folder (i.e. \"CacheFiles\")")