- Open Automator
- Create a new document
- Select Quick Action
- Set “Service receives selected” to
files or folders
inany application
- Add a
Run Shell Script
action- your default shell should already be selected, otherwise use
/bin/zsh
for macOS 10.15 (”Catalina”) or later - older versions of macOS use
/bin/bash
- your default shell should already be selected, otherwise use
- if you're using something else, you probably know what to do 😉
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe | |
rem add it for all file types | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f | |
rem add it for folders | |
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CONFIG=~/.route.conf | |
function usage() { | |
echo -e "Usage: `basename $0` <options>\noptions:" | |
grep "^function" $0 | sed 's/function/ /g' | sed 's/[{()]//g' | |
} | |
function list() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CLIENT=/usr/local/pulse/PulseClient.sh | |
CONFIG=~/.sslvpn.conf | |
function usage() { | |
echo -e "Usage: `basename $0` <options>\noptions:" | |
grep "^function" $0 | sed 's/function/ /g' | sed 's/[{()]//g' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
devServer: { | |
proxy: { | |
'/api': { | |
target: 'http://localhost:8000/api', | |
changeOrigin: true, | |
ws: true, | |
pathRewrite: { | |
'^/api': '' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rem Register command | |
sc create Gitea start= auto binPath= ""D:\Applications\gitea\gitea.exe" web --config "D:\Applications\gitea\my-app.ini"" | |
rem De-register command | |
sc delete Gitea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'Adding repository of sierra theme ...' | |
sudo add-apt-repository ppa:dyatlov-igor/sierra-theme -y | |
echo 'Adding repository of spotify ...' | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0DF731E45CE24F27EEEB1450EFDC8610341D9410 931FF8E79F0876134EDDBDCCA87FF9DF48BF1C90 | |
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list | |
echo 'Updating apt ...' | |
sudo apt update |
Download the package: http://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/rsync-3.1.2-2-x86_64.pkg.tar.xz
Extract it and move rsync.exe
to %HOMEDRIVE%%HOMEPATH%\AppData\Local\Programs\Git\usr\bin
.
This note illustrates how to adjust resolution using keyboard shorcut using built-in app automator
.
After setting up, I can use two actions:
- Switch to Highest resolution
- Switch to Default resolution
I'm new to apple script, so the rule is very simple.
NewerOlder