Skip to content

Instantly share code, notes, and snippets.

View Fusl's full-sized avatar
🏳️‍🌈
🦊

Katie Holly Fusl

🏳️‍🌈
🦊
  • VRChat
  • Everywhere.
  • 16:47 (UTC)
View GitHub Profile
@Fusl
Fusl / gist:e54e5eeabc3196c7a63dec6f9ab2bfda
Created February 25, 2018 03:14 — forked from cdown/gist:1163649
Bash urlencode and urldecode
urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:i:1}"
case $c in
[a-zA-Z0-9.~_-]) printf "$c" ;;
#!/bin/sh
# ./convert_ploop_to_simfs.sh VEID
# chmod +x convert_ploop_to_simfs.sh
rsync_options='-aHAX --progress --stats --numeric-ids --delete'
partition='vz'
if [ ! -e /etc/vz/conf/$1.conf ]; then
echo "Virtual server configuration file: /etc/vz/conf/$1.conf does not exist."
exit 1
fi
if [ ! -d /$partition/private/$1/root.hdd ]; then