Skip to content

Instantly share code, notes, and snippets.

View ShikChen's full-sized avatar
💤
Sleeping from home

ShikChen

💤
Sleeping from home
View GitHub Profile
@nreHieW
nreHieW / transformer.py
Created July 9, 2024 13:36
2024 Noam Transformer
"""
The 2024 Transformer (the Noam Transformer):
- RMSNorm
- GQA or some combination
- Sliding window attention
- Swiglu
- RoPE (Rotary Positional Embedding)
LLM Arches:
hidden | MLP mult. | n_layers | rope_theta | GQA Group Size | GLU Act. | ops
@catgirlinspace
catgirlinspace / readme.md
Last active January 12, 2023 05:51
splatnet 3 paths

hi! this is a list of all¹ the paths in the splatnet 3 application as of september 10th, 2022. a lot of these are probably not useful for external applications. i found all these manually through developer tools. some may be incorrect. a : indicates that it's a parameter. i have marked what i considered to be notable with a ⭐️ emoji.

these can be used to launch the splatnet 3 application on a device with the nintendo switch online app installed. on ios, this is done with com.nintendo.znca://znca/game/4834290508791808?p=<url encoded path>. i am not sure how this works on android, but it's probably similar. for example, to open the anarchy schedule, use com.nintendo.znca://znca/game/4834290508791808?p=%2Fschedule%2Fbankara.

@johnkhbaek
johnkhbaek / machoload.c
Last active December 29, 2025 02:11
Load macho using NSLinkModule with arguments
/*
================================================================================
modified from this: https://github.com/its-a-feature/macos_execute_from_memory (supports only bundle)
code injection : https://github.com/CylanceVulnResearch/osx_runbin by Stephanie Archibald (does not support m1 x64 emulation and FAT header)
added FAT header (universal Macho) parsing
script-kiddied, debugged, etc. by @exploitpreacher
================================================================================
*/
@kb10uy
kb10uy / sus-specification-2.7.md
Last active September 4, 2025 02:28
SUS フォーマット v2.7 仕様

SUS Format Specification v2.7 (rev2)

注: SUS は今や Sliding Universal Score の略であり、 SeaUrchin Score ではありません。

1. 概要

  • テキストデータであり、全て printable character で構成される。
  • 拡張子: *.sus
  • EOL: CRLF もしくは LF
  • エンコード: 常に UTF-8
  • # で始まる行がデータとして意味を持ち、それ以外の行はコメントとして無視される。
  • 文字列データを指定する部分は " ~ " でクォートする。
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active December 29, 2025 20:19
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

WARNING: Article moved to separate repo to allow users contributions: https://github.com/raysan5/custom_game_engines

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like [Unreal](https:

@Treeki
Treeki / TurnipPrices.cpp
Last active December 17, 2025 08:36
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@Chillee
Chillee / dinic.cpp
Last active December 8, 2024 16:50
Max Flow (Dinic's, HLPP)
template <int MAXV, class T = int> struct Dinic {
const static bool SCALING = false; // non-scaling = V^2E, Scaling=VElog(U) with higher constant
int lim = 1;
const T INF = numeric_limits<T>::max();
struct edge {
int to, rev;
T cap, flow;
};
int s = MAXV - 2, t = MAXV - 1;
'use strict';
const kPromiseState = Symbol('[[PromiseState]]');
const kPromiseFulfillReactions = Symbol('[[PromiseFulfillReactions]]');
const kPromiseRejectReactions = Symbol('[[PromiseRejectReactions]]');
const kPromiseIsHandled = Symbol('[[PromiseIsHandled]]');
const kPromiseResult = Symbol('[[PromiseResult]]');
const kPromise = Symbol('[[Promise]]');
const kResolve = Symbol('[[Resolve]]');
const kReject = Symbol('[[Reject]]');
@jdarpinian
jdarpinian / C and shell polyglot.cmd
Last active September 2, 2025 20:57
Polyglot files that can run on Windows, Linux, and Mac using bash, cmd, and C.
#if 0 // 2>NUL & GOTO :startbatch
COMPILER_OPTIONS="-g -Wall -Wextra --std=c99 -O1";THIS_FILE="$(cd "$(dirname "$0")"; pwd -P)/$(basename "$0")";OUT_FILE="/tmp/build-cache/$THIS_FILE";mkdir -p "$(dirname "$OUT_FILE")";test "$THIS_FILE" -ot "$OUT_FILE" || $(which clang || which gcc) $COMPILER_OPTIONS -xc "$THIS_FILE" -o "$OUT_FILE" || exit;exec "$OUT_FILE" "$@"
:startbatch
@echo off
setlocal enableextensions enabledelayedexpansion
md %TEMP%%~p0 2>NUL
rem Use xcopy to test if this file is newer than the cached executable.
for /f %%i in ('xcopy %0 %TEMP%%~pnx0.exe /D /Y /Q') do set copied=%%i
if "%copied:~0,1%" neq "0" (
rem Search for Visual Studio env vars. These are set globally if VS <2017 is installed.
@WangYihang
WangYihang / HITCON-2017-WEB-BabyFirstRevenge.py
Created November 6, 2017 04:12
Exploit for HITCON-2017-WEB-BabyFirstRevenge
#!/usr/bin/env python
# encoding:utf-8
# Author : WangYihang
# Email : wangyihanger@gmail.com
# To solve HITCON-2017-WEB-BabyFirstRevenge
import requests
import hashlib
def get_global_ip():