Skip to content

Instantly share code, notes, and snippets.

View SeriousBusiness100's full-sized avatar

SeriousBusiness100

View GitHub Profile
@pkhuong
pkhuong / yannakakis.md
Last active November 8, 2024 15:56
A minimal version of Yannakakis's algorithm for mostly plain Python
#!/usr/bin/env sed -re s|^|\x20\x20\x20\x20| -e s|^\x20{4}\x23\x23{(.*)$|<details><summary>\1</summary>\n| -e s|^\x20{4}\x23\x23}$|\n</details>| -e s|^\x20{4}\x23\x23\x20?|| -e s|\x0c|\x20|
license, imports
# Yannakakis.py by Paul Khuong
#
# To the extent possible under law, the person who associated CC0 with
# Yannakakis.py has waived all copyright and related or neighboring rights
# to Yannakakis.py.

@antimatter15
antimatter15 / README.md
Created August 16, 2021 06:21
Arbitrary Base Conversion Algorithm (Javascript)

Arbitrary Base Conversion Algorithm

This is a function that can convert between arbitrary bases implemented in both Javascript and Python.

Many existing implementations, such as https://rot47.net/base.html or https://gist.github.com/inflammable/2929362 use a number as the internal representation, and thus can't safely encode/decode more than 8 letters of Base64 encoded text, or 9 letters of Base58 text (which isn't enough for parsing a Bitcoin address).

Other implementations rely on complicated third party libraries for bignum (e.g. https://rosettacode.org/wiki/Non-decimal_radices/Convert#JavaScript).

Several implementations required converting to Uint8Arrays (Base 256) as an intermediate. Others were essentially ports of complicated C implementations (see https://github.com/cryptocoinjs/base-x/blob/master/src/index.js).

@obskyr
obskyr / X-MAS CTF 2020 – Ken Kutaragi's Secret Code.md
Created December 20, 2020 02:53
How to Reverse-Engineer a PS1 Game – X-MAS CTF 2020 Writeup

X-MAS CTF 2020 Writeup: Ken Kutaragi's Secret Code

Or, How to Reverse-Engineer a PS1 Game

X-MAS CTF 2020 was my first CTF – I do ROM hacking, fan translation, and hardware modding, but I haven't done much hacking related to modern systems, so I was a wee bit worried there wouldn't be many challenges suited to my skillset. Imagine my surprise and delight, then, when I saw the challenge Ken Kutaragi's Secret Code, which consists of a PlayStation executable! And wouldn't you know it? I've hacked away at quite a few PS1 games in my day! Not many people solved it, likely because it requires quite niche skills – so let me share those with you!


Identifying our goal

The challenge description is as follows.

@StevenACoffman
StevenACoffman / Homoglyphs.md
Last active April 18, 2025 17:30
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ
@slightfoot
slightfoot / page_turn.dart
Created September 9, 2019 21:28
Page Turn Effect - By Simon Lightfoot. Replicating this behaviour. https://www.youtube.com/watch?v=JqvtZwIJMLo
// MIT License
//
// Copyright (c) 2019 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@tribulant
tribulant / style.css
Created October 21, 2016 11:45
Override Bootstrap Styles
/*
Put this CSS in a file that loads after the bootstrap.css
Eg. Inside wp-checkout/views/bootstrap/style.css
Start each Bootstrap class you want to override with .checkout ...
This example will remove the rounded corners from the button.
It will make the button pink with black text.
And on hover, active or focus the button will be red with white text
*/
@briantjacobs
briantjacobs / config.yml
Created November 24, 2015 19:43
Parse YAML from bash with sed and awk.
development:
adapter: mysql2
encoding: utf8
database: my_database
username: root
password:
apt:
- somepackage
- anotherpackage
@kakilangit
kakilangit / gist:797b6ae6291c1bd7712c
Last active December 23, 2022 18:35
Pony VS Golang Thread Ring Benchmarks
## Rule: http://benchmarksgame.alioth.debian.org/u32/performance.php?test=threadring#about
## Source Code: https://github.com/kakilangit/benchmarks/tree/master/thread-ring
# Model Name: MacBook Pro
# Model Identifier: MacBookPro11,1
# Processor Name: Intel Core i5
# Processor Speed: 2.6 GHz
# Number of Processors: 1
# Total Number of Cores: 2
#pass=50.000.000 threads/actors/goroutines=503
@tylerneylon
tylerneylon / json.lua
Last active March 31, 2025 01:08
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
@pirate
pirate / usernames.txt
Last active March 15, 2025 07:29
Untaken 3-letter Usernames on Github
None of these 3 letter-only usernames below are available anymore as of 2021.
However, if you use numbers and symbols, or accept 4 letters, you can definitely find a free one.
Check responsibly. Don't spam the github API/support, it's not a race, there are plenty free if you have imagination.
agq, ahq, aqf, aqg, aqp, aqt, aqf, aqy, atq, auh, ayp, azj, azq, bey, bgt, bgx, bhq, bkk, bkq, bmq,
bpp, bpq, bqa, bqc, bqg, bqi, bqj, bql, bqn, bqo, bqp, bqr, bqt, bqy, buo, buq, bwz, bxe, bxo, bxw,
bzn, bzp, cfl, ckg, ckq, cnq, cpq, cpz, cqa, cqe, cqf, cqg, cqk, cqo, cqp, cqf, cqx, cqz, cud, cuh,
cuk, cuo, cfl, cxe, czo, dkq, dnq, dqg, dqi, dqk, dqo, dqs, dsr, dtq, dxe, eaj, eaq, ebq, ecl, ecy,
eer, efq, efy, egq, egx, ehh, ehz, eiu, eiw, eiy, ejx, eoq, eou, epj, eqa, eqb, eqf, eqg, eqj, eqk,
eqs, eqf, eqw, eqz, erq, etq, eub, euf, euj, euq, euf, efq, efy, ewy, ewz, exn, eyh, eyj, eyn, eyq,