123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- ##############################################################################
- #
- # Mac OS X Commands
- #
- ##############################################################################
- alias cb='pbcopy'
- alias wireshark='sudo /Applications/Wireshark.app/Contents/MacOS/Wireshark'
- if file_exists "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"; then
- function subl() {
- /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl ${1:-.}
- }
- fi;
- if file_exists "/Users/ramatevish/projects/llama.cpp/main"; then
- function llama() {
- (cd /Users/ramatevish/projects/llama.cpp; ./main --color -i -ins -n 512 -p "You are a helpful AI who will assist, provide information, answer questions, and have conversations." -m ggml-alpaca-7b-native-q4-migrated.bin)
- }
- fi;
- # Record audio files
- if command_exists sox; then
- alias record="sox -d ${1:-out.mp3}"
- fi
- # Only enable if Kaleidoscope is installed
- if grep Kaleidoscope ~/.gitconfig > /dev/null 2>&1; then
- alias gm='git mergetool -y -t Kaleidoscope';
- fi
- if command_exists uuidgen; then
- alias uuidgen="uuidgen | awk '{print tolower($1)}'"
- fi
- function rmdstore() {
- find . -name '.DS_Store' -type f -delete
- }
- if command_exists ykman; then
- function 2fac () {
- DEV_ID="${2:-5421671}"
- if defined $1; then
- ykman --device $DEV_ID oath code $1 | tee /dev/tty | awk '{ print $2 }' | pbcopy
- else
- ykman --device $DEV_ID oath code
- fi
- }
- function 2facs() {
- watch -n1 -d ykman oath code
- }
- fi
- function unfuck-core-audio {
- ps aux | grep coreaudio | grep -v grep | awk '{ print $2 }' | sudo xargs kill -9
- }
- function unfuck-windows {
- killall -KILL Dock
- }
- function ls-usb {
- ioreg -p IOUSB -w0 | sed 's/[^o]*o //; s/@.*$//' | grep -v '^Root.*'
- }
- function pwinfo {
- # ioreg -w 0 -f -r -c AppleSmartBattery
- system_profiler SPPowerDataType
- }
|