Skip to content

Instantly share code, notes, and snippets.

View simonsan's full-sized avatar
🦀
Let's listen to this cassette on my rusty tapedeck. Drops ICE.

simonsan

🦀
Let's listen to this cassette on my rusty tapedeck. Drops ICE.
View GitHub Profile
@simonsan
simonsan / compress.rs
Created February 16, 2024 06:18 — forked from ayazhafiz/compress.rs
Emits an identical rust program with comments removed and whitespace minimized.
use rustc_lexer::{tokenize, Token, TokenKind};
use std::io::{self, Read};
enum Cmd {
Print(usize),
Space,
Skip(usize),
}
fn layout(toks: impl Iterator<Item = Token>) -> impl Iterator<Item = Cmd> {
@simonsan
simonsan / capture-age.sh
Created January 10, 2024 21:40 — forked from brodock/capture-age.sh
Capture Age on Linux
#!/bin/bash
set -x
PROTON="GE-Proton8-4"
APPID=813780
CAPTURE_AGE_VERSION=1.6.1
STEAM_PATH="${HOME}/.steam"
STEAMAPPS="${STEAM_PATH}/root/steamapps"
COMPATIBILITY_TOOLS="${STEAM_PATH}/root/compatibilitytools.d"
@simonsan
simonsan / Siege Engineers Rules
Created December 4, 2023 10:15 — forked from abductedPlatypus/Siege Engineers Rules
Siege Engineers Discord Rules
1. No racism, sexism, bigotry, hate speech, profanity towards people or groups, and other attacks on people or groups.
2. No sharing of pirated software or encourage piracy in any channel.
3. No intent to abuse or trigger behaviour related to mental issues (e.g. autism spectrum, borderline, depression, dysphoria, stress etc.)
4. No discussions about politics/religion/ideology
5. There is a restricted area focused on Reverse Engineering; Invitation to this area can only be received through current members of that area. The best way to gain access is to show your previous work to one of these members. A mod has to approve any request.
6. Don't beg to be added to the restricted area.
7. Don't repeatedly ask the same question, people will update you when they know more.
8. Secret channels are marked with 🤐, don’t share information with people without access to them.
9. Doing the same work should be discouraged. Working together should be applauded.
10. New channels for projects can be made when requested by at le
git checkout --orphan freshBranch
git add -A
git commit
git branch -D main
git branch -m main
git push -f origin main
git gc --aggressive --prune=all
git push -f origin main
@simonsan
simonsan / civs_aoe2.json
Created May 13, 2023 11:42
Relic Link API
{
"Bengalis": {
"1": 1,
"2": 1
},
"Poles": {
"1": 31,
"2": 31
},
"Slavs": {
@simonsan
simonsan / godot_game.iss
Created May 6, 2023 02:53 — forked from ssokolow/godot_game.iss
Example Inno Setup script for Godot games
; IMPORTANT: Follow the instructions at
; https://docs.godotengine.org/en/stable/getting_started/workflow/export/changing_application_icon_for_windows.html
; and make sure the "Options > Application > Product Version" field is set
; in Godot's Export dialog before exporting your EXE file. Otherwise,
; Inno Setup will mistake the Godot version for your game's version.
;
; You can check whether you were successful by examining the .EXE file's
; properties dialog on Windows, or by using the `peres -v` command from `pev`
; on Linux.
;
@simonsan
simonsan / DemangleRust.py
Created December 29, 2021 18:52 — forked from str4d/DemangleRust.py
Ghidra script for demangling Rust symbols
# Attempts to demangle all mangled symbols in the current program using the Rust
# mangling schemes, and replace the default symbol and function signature
# (if applicable) with the demangled symbol.
#
# License: MIT OR Apache-2.0
#@author Jack Grigg <thestr4d@gmail.com>
#@category Symbol
from ghidra.app.util.demangler import (
DemanglerOptions,
@simonsan
simonsan / typescript-crash.ts
Created December 26, 2021 20:36 — forked from bradtraversy/typescript-crash.ts
Basic intro to TypeScript (From YouTube Crash Course)
// Basic Types
let id: number = 5
let company: string = 'Traversy Media'
let isPublished: boolean = true
let x: any = 'Hello'
let ids: number[] = [1, 2, 3, 4, 5]
let arr: any[] = [1, true, 'Hello']
// Tuple
@simonsan
simonsan / zalgo.rs
Created December 17, 2021 14:22 — forked from Eolu/zalgo.rs
Rust code to create Zalgo text
use rand::{Rng, thread_rng};
const ZALGO_UP: [char; 50] =
[
'\u{030e}', /* ̎ */ '\u{0304}', /* ̄ */ '\u{0305}', /* ̅ */
'\u{033f}', /* ̿ */ '\u{0311}', /* ̑ */ '\u{0306}', /* ̆ */ '\u{0310}', /* ̐ */
'\u{0352}', /* ͒ */ '\u{0357}', /* ͗ */ '\u{0351}', /* ͑ */ '\u{0307}', /* ̇ */
'\u{0308}', /* ̈ */ '\u{030a}', /* ̊ */ '\u{0342}', /* ͂ */ '\u{0343}', /* ̓ */
'\u{0344}', /* ̈́ */ '\u{034a}', /* ͊ */ '\u{034b}', /* ͋ */ '\u{034c}', /* ͌ */
'\u{0303}', /* ̃ */ '\u{0302}', /* ̂ */ '\u{030c}', /* ̌ */ '\u{0350}', /* ͐ */