-
Notifications
You must be signed in to change notification settings - Fork 1
/
.macos
34 lines (28 loc) · 1.49 KB
/
.macos
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
# Show/hide system files
alias showsysfiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hidesysfiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
# VSCode key repeat (https://stackoverflow.com/questions/39972335/how-do-i-press-and-hold-a-key-and-have-it-repeat-in-vscode/44010683#44010683)
# defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false
# Restart camera
# alias fixcam='sudo killall VDCAssistant'
# Restart bluetooth
# alias fixbt='sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport'
# Toggle wifi
# alias togglewifi="networksetup -setairportpower airport off && networksetup -setairportpower airport on && networksetup -setairportpower en0 off && networksetup -setairportpower en0 on"
# Use airport to search for wifi networks
# alias airport="/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport"
# alias airport-bssid="/Applications/airport-bssid-0.1.0/Build/Release/airport-bssid"
# Extract jpgs from mp4s
# https://trac.ffmpeg.org/wiki/Create%20a%20thumbnail%20image%20every%20X%20seconds%20of%20the%20video
# function process_MP4s() {
# for f in *.MP4
# do
# ffmpeg -i $f -f image2 -r 1 -q 1 $f-%08d.jpg
#
# for jpg in $f*.jpg
# do
# SetFile -d "$(GetFileInfo -d $f)" $jpg
# SetFile -m "$(GetFileInfo -m $f)" $jpg
# done
# done
# }