SYSTEM WIDE
$ defaults write -g ApplePressAndHoldEnabled -bool false
ONLY FOR WARP
$ defaults write dev.warp.Warp-Stable ApplePressAndHoldEnabled -bool false
$ defaults write -g ApplePressAndHoldEnabled -bool false
$ defaults write dev.warp.Warp-Stable ApplePressAndHoldEnabled -bool false
$ gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPDFPassword=PASSWORD -sOutputFile=OUTPUT.pdf -f ENCRYPTED.pdf
Install GhostScript on Mac
$ brew install ghostscript
$ youtube-dl -F 8Gpa_pdHrPE
List format for a playlist
$ youtube-dl -F PLBiQZMT3oSxW1RS1hn2jWBgswh0nlcgQZ\&index\=1
[youtube] 8Gpa_pdHrPE: Downloading webpage
[youtube] 8Gpa_pdHrPE: Downloading MPD manifest
[info] Available formats for 8Gpa_pdHrPE:
format code extension resolution note
139 m4a audio only DASH audio 54k , m4a_dash container, mp4a.40.5@ 48k (22050Hz)
140 m4a audio only DASH audio 134k , m4a_dash container, mp4a.40.2@128k (44100Hz)
251 webm audio only DASH audio 136k , webm_dash container, opus @160k (48000Hz)
278 webm 256x144 DASH video 95k , webm_dash container, vp9, 30fps, video only
160 mp4 256x144 DASH video 108k , mp4_dash container, avc1.4d400b, 30fps, video only
242 webm 426x240 DASH video 220k , webm_dash container, vp9, 30fps, video only
133 mp4 426x240 DASH video 242k , mp4_dash container, avc1.4d400c, 30fps, video only
134 mp4 640x360 DASH video 274k , mp4_dash container, avc1.4d401e, 30fps, video only
243 webm 640x360 DASH video 405k , webm_dash container, vp9, 30fps, video only
244 webm 854x480 DASH video 752k , webm_dash container, vp9, 30fps, video only
135 mp4 854x480 DASH video 1155k , mp4_dash container, avc1.4d4014, 30fps, video only
247 webm 1280x720 DASH video 1505k , webm_dash container, vp9, 30fps, video only
137 mp4 1920x1080 DASH video 1831k , mp4_dash container, avc1.640028, 30fps, video only
136 mp4 1280x720 DASH video 2310k , mp4_dash container, avc1.4d4016, 30fps, video only
248 webm 1920x1080 DASH video 2646k , webm_dash container, vp9, 30fps, video only
18 mp4 640x360 360p 216k , avc1.42001E, 30fps, mp4a.40.2@ 96k (44100Hz), 123.62MiB
22 mp4 1280x720 720p 511k , avc1.64001F, 30fps, mp4a.40.2@192k (44100Hz) (best)
.bashrc or .zshrc
alias ytdl="youtube-dl --merge-output-format mp4 -f \"bestvideo+bestaudio[ext=m4a]/best\" -o \”%(title)s.%(ext)s\” --embed-thumbnail --add-metadata"
usage
$ ytdl 8Gpa_pdHrPE
$ ytdl PLBiQZMT3oSxW1RS1hn2jWBgswh0nlcgQZ\&index\=1
$ brew install convmv
# Convert all files in a directory from NFD to NFC:
$ convmv -f utf-8 -t utf-8 --nfc --notest .
# Convert all files in a directory from NFC to NFD:
$ convmv -f utf-8 -t utf-8 --nfd --notest .
NFD to NFC with iconv
$ iconv -f UTF-8 -t UTF-8-MAC
NFD to NFC with rsync
$ rsync --iconv=utf-8,utf-8-mac
$ ssh-add ~/.ssh/id_rsa_SERVER
Verify keys
$ ssh-add -l
Test keys
$ ssh -v URL_TO_HOST
Connect to server
$ ssh HOSTNAME_OR_ALIAS
$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *251.0 GB disk0
1: EFI EFI 314.6 MB disk0s1
2: Apple_APFS Container disk1 250.7 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +250.7 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD - Data 77.5 GB disk1s1
2: APFS Volume Preboot 82.0 MB disk1s2
3: APFS Volume Recovery 528.1 MB disk1s3
4: APFS Volume VM 1.1 GB disk1s4
5: APFS Volume Macintosh HD 11.1 GB disk1s5
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *124.2 GB disk2
1: Windows_FAT_32 CCCOMA_X64F 124.2 GB disk2s1
$ diskutil unmountDisk /dev/disk2
Unmount of all volumes on disk2 was successful
$ sudo dd if=kali-linux-2020.1b-installer-amd64.iso of=/dev/disk2 bs=1m
Password:
2075+1 records in
2075+1 records out
2176778240 bytes transferred in 656.146374 secs (3317519 bytes/sec)
$ gcc -m32 fib.c ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS) ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd Undefined symbols for architecture i386: "_printf", referenced from: _main in fib-68f6b9.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
$ sudo rm -rf /Library/Developer/CommandLineTools $ xcode-select --install $ open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
$ gcc -m32 fib.c ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
$ make CFLAGS="-m32" fib cc -m32 fib.c -o fib ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
Attachment filename is encoded to UTF-8
Run the following command within Terminal, then restart Apple mail.$ defaults write com.apple.mail NSPreferredMailCharset "UTF-8"
$ sudo route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.0.1 $ sudo route add -net 192.168.1.0 netmask 255.255.0.0 gw 192.168.0.254 $ sudo route add -net 192.168.0.0 netmask 255.255.0.0 dev eth0 $ sudo route add -net 192.168.1.0 netmask 255.255.0.0 dev eth1
on Mac$ sudo route add -net 192.168.0.0/16 gw 192.168.0.1 $ sudo route add -net 192.168.1.0/16 gw 192.168.0.254 $ sudo route add -net 192.168.0.0/16 dev eth0 $ sudo route add -net 192.168.1.0/16 dev eth1
$ sudo route -n add -net 192.168.0.0 -netmask 255.255.0.0 192.168.0.1 $ sudo route -n add -net 192.168.1.0 -netmask 255.255.0.0 192.168.0.254
$ sudo route -n add -net 192.168.0.0/16 192.168.0.1 $ sudo route -n add -net 192.168.1.0/16 192.168.0.254
$ sips sips 10.4.4 - scriptable image processing system. This tool is used to query or modify raster image files and ColorSync ICC profiles. Its functionality can also be used through the "Image Events" AppleScript suite. Try 'sips --help' or 'sips --helpProperties' for help using this tool
$ sips -s format icns input.png --out output.icns


$ hdiutil create -size 100g -layout GPTSPUD -fs "Journaled HFS+" -volname "Secured Repository" -type SPARSEBUNDLE -encryption AES-128 EncDiskImg* For more options
Enter a new password to secure "EncryptedDisk.sparsebundle": **********
Re-enter new password: **********
created: /Users/dee/Cloud/EncDiskImg.sparsebundle
$ hdiutil create -helpor use Disk Utility
Double click the image on Finder then answer password you enter the above.or
$ hdiutil mount EncDiskImg.sparsebundle
Enter password to access "EncDiskImg.sparsebundle": **********
/dev/disk2 GUID_partition_scheme
/dev/disk2s1 EFI
/dev/disk2s2 Apple_HFS /Volumes/Secured Repository
$ setfile -a V EncDiskImg.sparsebundle
do shell script "hdiutil mount /PATH/TO/EndDiskImg.sparsebundle"