Skip to content

Instantly share code, notes, and snippets.

# Testing Join gist MD
https://gist.githubusercontent.com/w13d/9075bad84b265824b4880f9e6f741225/raw/63b02530fe89955ed7d1a27c074db4116c086d9b/Move%2520Download%2520to%2520external.md
<script src="https://gist.github.com/w13d/9075bad84b265824b4880f9e6f741225.js"></script>
@w13d
w13d / Move Download to external.md
Last active September 26, 2024 04:35
Move MacOS Download folder

Move MacOS Download Folder to External Harddrive

A self note of mine, helping to preserve the storage in MacOS' main SSD.

source : https://apple.stackexchange.com/questions/301159/how-to-replace-the-systems-download-folder-with-one-in-an-external-drive

This below has tried and confirmed Working on macOS Big Sur as well as Monterey.
The main purpose of this exercise is as per mentioned above, preserving the storage of the main ssd(hdd) of MacOS system. Downloads is the folder that filled up very fast and soon enough will make system suffocated for a disk cache. So it is always a better practice to keep it out from the main storage and so move it to the external storage.

TL;DR

@w13d
w13d / SED.md
Last active June 21, 2023 04:51
Using SED command line

Menggunakan command "SED" di MacOS Terminal (BSD/ZSH)

Manipulasi teks dengan Stream Editor (SED)

Bentuk perintahnya : sed

$sed 's/search{pattern/regex}/replace{content/regex}/'

$echo -e 76-0636_MACASSAREBONY-IS_F.png \nW3200 x H3200 pixel | sed 's/.\{0,\}\(W[0-9].*\)/\1/g'
@w13d
w13d / SPF Records.md
Last active November 14, 2018 01:02
SPF Records
@w13d
w13d / Find.md
Last active May 14, 2025 09:24
Terminal Command Line "Find"

Menggunakan command "FIND" di Terminal

Mencari file di folder

Bentuk perintahnya : Find

$find_(parameter)_(lokasi folder)_(argumen pencarian)_(perintah lanjutan)

$find -L . -name "60-0001*.png" -exec cp {} /Desktop/ \;
@w13d
w13d / Everyday Docker commands
Last active September 12, 2018 01:30
Docker command cheat sheet
docker build -t friendlyname . # Create image using this directory's Dockerfile
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80
docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode
docker container ls # List all running containers
docker container ls -a # List all containers, even those not running
docker container stop <hash> # Gracefully stop the specified container
docker container kill <hash> # Force shutdown of the specified container
docker container rm <hash> # Remove specified container from this machine
docker container rm $(docker container ls -a -q) # Remove all containers
docker image ls -a # List all images on this machine
@w13d
w13d / Profile for VPN Apple Configurator
Created November 13, 2017 16:13
Apple configurator untuk VPN
SOURCE : https://apple.stackexchange.com/questions/32392/how-to-auto-connect-to-vpn-upon-login-boot/32395#32395
Another way to go about this, is by creating a Configuration Profile (using Apple Configurator). Using this tool, recreate your VPN configuration and save the file. After you've created the file, open it up in a text editor and look for the following:
<key>VPNType</key>
<value>(...)</key>
Add the following below:
@w13d
w13d / Panduan untuk restore mac dari time machine
Last active November 14, 2017 07:51
restore Mac from time machine
https://support.apple.com/en-us/HT204350
@w13d
w13d / copast
Created November 9, 2017 22:27
kumpulan temporary kopas
https://www.cloudwards.net/how-to-beat-the-netflix-vpn-ban/
@w13d
w13d / Docker Softethervpn
Last active November 10, 2017 09:48
Instalasi Softethervpn via Docker di vps
docker run -d \
--name vpn \
--cap-add NET_ADMIN \
-p 500:500/udp \
-p 4500:4500/udp \
-p 1701:1701/tcp \
-e PSK="w13dSGvpn" \
-e USERS="user0:pass0;user1:pass1" siomiz/softethervpn