control + shift + space
command/control + ,
👆/👇/👈/👉
| usb.generic.allowHID = "TRUE | |
| usb.generic.allowLastHID = "TRUE" |
| #!/bin/sh | |
| cd $1; convert 'xc:none[1024x1024]' folder.png; folderify -x 10.8 folder.png | |
| mv folder.iconset/icon_512x512\@2x.png .; rm -frv folder.{ic{,o}ns{,et},png} | |
| find $1 -name Icon^M; cd $dir; icns2png -x -s 1024 Icon^M | |
| convert -transparent white <(compare -fuzz 16% Icon^M_1024x1024x32.png \ | |
| $1/icon_512x512\@2x.png -compose src -highlight-color black png:) logo.png | |
| folderify logo.png .; chflags hidden ./Icon^M; rm logo.png |
| #!/bin/bash | |
| shopt -s expand_aliases; fb=https://m.facebook.com; open $fb/$1/photos; sleep 10 | |
| function safari-cli { eval osascript -e \'tell application \"Safari\" to $1\'; } | |
| alias sst='safari-cli "get source of current tab of front window"' | |
| alias sct='safari-cli "close current tab of front window"' | |
| sst | tr \" \\n | grep ^/.*42$ | cut -d\& -f1 | xargs -I {} open $fb{}; sleep 10 | |
| mkdir $1; cd $1; for page in {01..40}; do URL=$(sst | tr \" \\n | grep -B1 Size\ | |
| | sed -E "s/amp;|\\\//g;q"); curl -v -o $(basename ${URL%\?*}) "$URL"; sct; done |
| # This file is executed for login shells | |
| # minimalist prompt string | |
| export PS1="$ " | |
| # set the editor of choice | |
| # [VISUAL vs. EDITOR](https://unix.stackexchange.com/questions/4859/visual-vs-editor-whats-the-difference) | |
| export VISUAL=nano | |
| export EDITOR="$VISUAL" |
See script for details of each file.
Apple Support article Fonts included with macOS Sierra is also a good resource, but it is fairly confusing in certain ways, e.g. Songti SC is listed both under fonts that are "installed and enabled automatically by macOS Sierra" and that are "available for download in macOS Sierra" (Update. I checked macOS 10.12 and Songti SC has been there all along).
There is also a seemingly very informative article, Font Management in macOS and OS X by Kurt Lang, which I found via Google Search. This is where I found out about the new directory /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/Resources/FontInfo in macOS Sierra which has replaced Stub Fonts in Font Book.app.
| #!/bin/bash | |
| # PRO TIP: Don't disable shit until you know exactly what it does. Remember that disabling doesn't kill the process, so most tweaks you need to reboot to fully see effects. | |
| # MINI TUTORIAL ON LAUNCHCTL | |
| # List all jobs in system: | |
| # launchctl list | |
| # first column is the process id, or - if the job is not loaded. second is exit code. |
Here is a script to take the hosts from From http://pgl.yoyo.org/adservers/ and convert them to rules for Little Snitch.
It has options to grab the entire list or grab new entries past a certain date.
Just grab the output and copy/paste into Little Snitch.
The script is written to block access to any process, any port. You can also delete those lines and it will only block Mail. Or use the options to enter any process, port or protocol you want to block.
| -- Modified from http://scriptingosx.com/2016/01/build-a-google-translate-service/ | |
| on run {input, parameters} | |
| set theText to input as string | |
| set oldDelims to AppleScript's text item delimiters | |
| set AppleScript's text item delimiters to {return & linefeed, return, linefeed, " | |
| ", character id 8233, character id 8232} | |
| -- list of line break chars from http://stackoverflow.com/questions/12546253/how-to-replace-n-in-applescript#12546965 | |
| set splitText to text items of theText | |
| set AppleScript's text item delimiters to {space} | |
| set theText to splitText as text |