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 October 9, 2024 23:18
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 August 18, 2024 16:13
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 October 24, 2024 16:16
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

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 or Unity for their games (or that's what lot of people think) because d

@Treeki
Treeki / TurnipPrices.cpp
Last active November 1, 2024 14:15
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
{
'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 August 7, 2023 09:42
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 : [email protected]
# To solve HITCON-2017-WEB-BabyFirstRevenge
import requests
import hashlib
def get_global_ip():
import socket, struct, os, binascii, base64, random, time, itertools
import telnetlib
def readline(sc, show = True):
res = ""
while len(res) == 0 or res[-1] != "\n":
data = sc.recv(1)
if len(data) == 0:
print repr(res)
raise Exception("Server disconnected")