- Open Automator
- Create a new document
- Select Quick Action
- Set “Service receives selected” to
files or foldersinany application - Add a
Run Shell Scriptaction- your default shell should already be selected, otherwise use
/bin/zshfor 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 hidden or 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
| property AIRDROP_FOLDER : "Path:to:AirDrop:Folder:in:Alias:format" | |
| property QUARANTINE_KEY : "59" | |
| property GET_QUARANTINE_COMMAND_START : "ls -l -@ '" | |
| property GET_QUARANTINE_COMMAND_END : "' | tr '\\n' ' ' | sed 's/.*com\\.apple\\.quarantine\\s*\\(\\d*\\)/ \\1/' | awk '{$1=$1};1'" | |
| on adding folder items to this_folder after receiving added_items | |
| repeat with i from 1 to length of added_items | |
| set current_item to item i of added_items | |
| set quarantine_type to getQuarantineType(POSIX path of current_item) |
This file contains hidden or 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
| (* | |
| * An script to create a new empty file based on the current selection in Finder: | |
| * - if there is nothing selected, it will create the file in the currently display folder | |
| * - if a file is selected, it will create the file in the folder of the selected file | |
| * - if a folder is selected, it will create the file in the selected folder | |
| * - if an application is selected, it will not create the file | |
| * | |
| * By default the name extention of the file is .txt. If the function key | |
| * is pressed while calling this script, the user will be prompted for the | |
| * extension. |
CTRL + A : Move the cursor to the beginning of the line
CTRL + E : Move the cursor to the end of the line
OPTION + Left Arrow : Move the cursor one word backward
OPTION + Right arrow : Move the cursor one word forward
Left Arrow : Move the cursor one character backward
Right Arrow : Move the cursor one character forward
This file contains hidden or 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
| export ZSH=$HOME/.oh-my-zsh | |
| export DEFAULT_USER='athityakumar' | |
| TERM=xterm-256color | |
| ZSH_THEME="powerlevel9k/powerlevel9k" | |
| POWERLEVEL9K_MODE='awesome-fontconfig' | |
| POWERLEVEL9K_PROMPT_ON_NEWLINE=true | |
| POWERLEVEL9K_PROMPT_ADD_NEWLINE=true | |
| POWERLEVEL9K_RPROMPT_ON_NEWLINE=true | |
| POWERLEVEL9K_SHORTEN_DIR_LENGTH=2 |
This file contains hidden or 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
| # BASH Configuration and Aliases | |
| # source: http://natelandau.com/my-mac-osx-bash_profile/ | |
| # source: https://github.com/mathiasbynens/dotfiles | |
| # Sections: | |
| # 0. Execute Only Once (if you want) | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching |
This file contains hidden or 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
| /* | |
| * This is a JavaScript Scratchpad. | |
| * | |
| * Enter some JavaScript, then Right Click or choose from the Execute Menu: | |
| * 1. Run to evaluate the selected text (Ctrl+R), | |
| * 2. Inspect to bring up an Object Inspector on the result (Ctrl+I), or, | |
| * 3. Display to insert the result in a comment after the selection. (Ctrl+L) | |
| */ | |
| (function () { | |
| var start = function () { |
This file contains hidden or 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
| // ==UserScript== | |
| // @name Stack Exchange hotness estimator | |
| // @namespace http://vyznev.net/ | |
| // @description Estimates how highly each Stack Exchange question would rank on the Hot Network Questions list | |
| // @author Ilmari Karonen | |
| // @version 0.4.3 | |
| // @license Public domain | |
| // @homepageURL https://meta.stackexchange.com/a/284933 | |
| // @downloadURL https://gist.github.com/vyznev/bb2c1adb6e96eb65a87bab3822c74e81/raw/se_hotness_estimator.user.js | |
| // @match *://*.stackexchange.com/questions/* |
This file contains hidden or 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
| # zshrc-cheat-sheet | |
| ### DIRECTORY | |
| ```bash | |
| %d # full working directory | |
| %/ # same as %d | |
| %~ # working directory starting from the home dir | |
| %x~ # same as %~but only shows x(int) amount of the lowest directories | |
| ``` | |
| ### NAMES | |
| ```bash |