-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell
38 lines (28 loc) · 1.59 KB
/
shell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# tip: add to shell commands, which makes searching your command history easier, makes it easier to remember and retrieve.
# original idea: https://programming.dev/post/572744
obscure-cmd --with-weird-flags -Qdt # searchable comment keywords
# print current directory but replace $HOME with ~, kinda like pwd
# `dirs` only for zsh
dirs +0
# remove ads from spotify client (macOS)
bash <(curl -sSL https://raw.githubusercontent.com/SpotX-CLI/SpotX-Mac/main/install.sh)
# download song with metadata from spotify link
ytmdl song-name-to-search --spotify-id=song-id
# view metadata of media file -> install mediainfo
mediainfo file.mp4
# view file/folder size
du -sh <path>
# script I use to sync 2 photo/pictures folder between drives
# -a: archive mode, preserves permissions, symlinks, etc. -v: verbose, -h: human readable, --delete: delete extraneous files from destination dirs
# the result is that /Volumes/howard/pictures will be an exact copy of /Volumes/photos-1/pictures
rsync -avh --delete /Volumes/photos-1/pictures /Volumes/howard
# spoof MAC address to avoid tracking from public wifi, instal spoof-mac
sudo spoof-mac randomize en0
# download youtube video as mp4
yt-dlp -f mp4 "https://www.youtube.com/watch?v=video-id"
# delete and shred file, so it can't be recovered later if anyone gets access to your hard drive
# normal delete permanently on any OS only delete the connection and still leaves the data on the hard drive to be recovered
bleachbit --shred file/path
# wildcard, i.e `*` is treated differently between zsh and bash
# e.g `command a.*` can run on bash but on zsh you need to run
command a.\*