Skip to content

Instantly share code, notes, and snippets.

@toAlice
toAlice / rounded_extrude.scad
Last active September 12, 2025 07:33
Rounded Linear Extrude OpenSCAD
// Consider using BOSL2 instead
module rounded_extrude(h, r, num = $fn ? $fn : 8) {
function absr() = abs(r);
module slicer(i = 1) {
function interval() = absr() / num;
function cal_offset(idx)
= (-absr() / r) * (absr() - sqrt(pow(r, 2) - pow((idx * interval() - absr()), 2)));
@toAlice
toAlice / minecraft-world-pregen.py
Last active August 25, 2025 18:07
Minecraft Server world pregen (teleport, free of mod)
#!/usr/bin/env python3
# tmux required
ID_PLAYER = 'alice' # change this to your idle player name
TMUX_SESSION = 'minecraft'
LEAP = 320 # gap between each loop. optimal for JourneyMap
STEP = 4 # increase this value if you paid for a super fast cpu
# region = [ 2 * IterX * LEAP, 2 * IterY * LEAP ]
@toAlice
toAlice / reboot-required.sh
Created February 2, 2022 10:20
Arch Linux reboot-required
#/usr/local/bin/reboot-required.sh
# Usage:
# if $(/usr/local/bin/reboot-required.sh); then
# echo "reboot required"
# else
# echo "reboot not required"
# fi
#!/bin/sh
PATH=/usr/bin
#!/usr/bin/env zsh
#set -o xtrace
SAVE_IFS="${IFS}"
SAVE_XZ_OPT="${XZ_OPT}"
#XZ_OPT='-9 -T4'
IFS=$(echo -en "\n\b")
@toAlice
toAlice / update_minecraft_bedrock_server.sh
Last active February 2, 2022 10:11
Minecraft Bedrock Edition's Official Dedicated Linux Server setup and upgrade script.
#!/usr/bin/env bash
FORCE=0
while getopts ":f" flag
do
case "${flag}" in
f)
echo "Ignoring $OPTARG"
FORCE=1
;;