Skip to content

Instantly share code, notes, and snippets.

View run-all.sh
#!/bin/bash
# This script runs all .sh files, excluding itself, in the directory it's run in.
# Get name of self script. Only works when running in current dir, doesn't work with symlinks. I'm lazy.
SELF="$(basename "$0")"
for file in *.sh; do
# Check if script is not self, and is a file
if [[ "$file" != "$SELF" ]] && [[ -f "$file" ]]; then
# Check if script is not executable
View README.md

genpasswd

wget -O ~/.local/share/genpasswd https://gist.githubusercontent.com/5HT2/30f98284e9f92e1b47b4df6e05a063fc/raw/1b84acc48dbd2609d402dd80a5e8802de84c3e90/genpasswd.sh
chmod +x ~/.local/share/genpasswd

# Please make sure that ~/.local/share is in your $PATH
echo "$PATH"
View SnowFlakeToInstant.kt
fun main() {
val snowflake = 563138570953687061 // 2019-04-03T23:11:37.924Z
println(snowflake.toInstant().prettyFormat())
}
/**
* @return an Epoch millisecond from a Discord Snowflake
* [offset] defaults to the first millisecond of 2015, or a "Discord Epoch"
*/
View lily58BuildLog.md
View OfflineMultiMC.md

Offline MultiMC Instructions

Prerequisites:

Replace /home/user/.local/share/multimc/accounts.json with this

{
    "accounts": [
 {