Skip to content

Instantly share code, notes, and snippets.

@und3fined
und3fined / ssh.pub
Created January 17, 2020 04:30
my pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDexsqEMv5M/+ahxtE4DamQmPqH0rVEGO4OAQQR6DbAbI89gGFqz2GdT05wEq2JCbenBnlENtZV79Eo9AH0tKjb9RihVteQr0IyDPIbB1LrBbzsSojRBWlzGNqUgpxl4LQHysWQ+FYVmhHgkEAFCZly99rUD5SK0mVoPxDU0luX5WnqKkmB/myiW/AGeZWR894VbS3QzuTeih1/feJYqeoR6qW+bF0XewCyjIZYNF+lPo6Df13t+whCkqKTogZMRK1ztoszwWlnVmQD6vzE0Uv80VNRpI74EWtta5NwHkcNUMwue9mdsTV79N6aV9Kv7hAeLAU6F8IhEV5v+CZg2DH7 [email protected]
@und3fined
und3fined / wg-manager.sh
Last active July 20, 2020 06:11
Wireguard manager script
#!/bin/bash
# wireguard user manager
WG_CONFIG="/etc/wireguard/wg0.conf"
WG_CONFIG_USER="/etc/wireguard/user.d"
function get_free_ip {
local ip=$(shuf -i 2-254 -n 1)
wg show | grep "10.0.0.$ip" > /dev/null
if [[ $? == 1 ]] ; then
@und3fined
und3fined / add-swap.sh
Last active August 19, 2020 02:52
How to Add Swap Space on CentOS 8
#!/bin/bash
# Make swap space
# ----------------
# How to use?
# Create add-swap.sh file with this content
# chmod +x add-swap.sh
# Run: ./add-swap.sh
if [[ $EUID -ne 0 ]]; then
echo "Please execute script with a superuser..." 1>&2
@und3fined
und3fined / extract-ipa.sh
Last active April 21, 2025 17:42
Extract IPA from Apple Configurator tools
#!/bin/zsh
# Save content as extract-ipa.sh file name
# chmod +x extract-ipa.sh
# Open terminal and run ./extract-ipa.sh <app id>
# App ID is Id in appstore url. Like https://apps.apple.com/cn/app/ai-app/id6447539504?l=en&uo=4
# App ID -> id6447539504
# Full command like: ./extract-ipa.sh id6447539504
WATCHED_DIR="$HOME/Library/Group Containers/K36BKF7T3D.group.com.apple.configurator/Library/Caches/Assets/TemporaryItems/MobileApps"