Skip to content

Instantly share code, notes, and snippets.

View arHSM's full-sized avatar

Han Seung Min - 한승민 arHSM

View GitHub Profile
@arHSM
arHSM / cargo_offload.sh
Last active December 26, 2023 09:17
Clean cargo registry
#!/usr/bin/env bash
## Deletes ~/.cargo cached data older than 2 weeks or `OFFLOAD_THRESHOLD`-days
# Based off of:
# https://gist.github.com/alexheretic/661cb78b49ca280c629c64be0fabf8d2
# Changes: added brainrot_location & threshold variable
# I reccomend pairing this with cargo-sweep https://github.com/holmgr/cargo-sweep
set -eu
@arHSM
arHSM / instagram_id.py
Last active November 18, 2022 12:01
Instagram IDs are fun! (Lies)
APLPHABETS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'
def id_to_code(id: int) -> str:
code = ''
while id > 0:
remainder = id % 64
id = int((id - remainder) / 64)
code = APLPHABETS[remainder] + code
@arHSM
arHSM / discord_enums.md
Created June 26, 2022 08:23
List of (somewhat) useful enums in the discord client

List of useful enums in the discord client

* Dont expect anything here to be up-to-date

Heres a list of useful enums in the discord client's source files:

  1. ActionTypes
  2. ActivityFlags
  3. ActivityGamePlatforms
  4. ActivityPartyApplicationNames