Here is a hand-held mobile computer running Python.
It does GRAPHING pretty well too!
Here is a hand-held mobile computer running Python.
It does GRAPHING pretty well too!
When I’m good about using and re-using functions in Bash I always end up passing arguments through from one function to another. For example:
function pie { open /Applications/Emacs.app --args --debug-init "$@" } function pienthm { EMACSNOTHEME=t pie --reverse-video "$@" }
Horrible to admit but I keep forgetting the syntax even are taking copious notes on the GNU Bash manual.
BTW: hear, hear to including Bash-isms in every shell script!
Learn how here and it will change your life a lot for the better.
Do it ASAP.
It is pretty simple: read here.
2021-04-16: Here is one in JavaScript.
THANK YOU SILESKY
Toggle Grayscale
tell application "System Preferences" activate set the current pane to pane id "com.apple.preference.universalaccess" delay 1 # needs time to open universal access tell application "System Events" to tell process "System Preferences" to tell window "Accessibility" tell scroll area 2 to tell table 1 to tell row 6 #open display preferences select end tell click checkbox "Use grayscale" end tell end tell tell application "System Preferences" to quit # Sierra: System Preferences -> Accessibility -> Display -> Use grayscale
Invert Colors
tell application "System Preferences" activate set the current pane to pane id "com.apple.preference.universalaccess" delay 1 # needs time to open universal access tell application "System Events" to tell process "System Preferences" to tell window "Accessibility" tell scroll area 2 to tell table 1 to tell row 6 #open display preferences select end tell click checkbox "Invert colors" end tell end tell tell application "System Preferences" to quit # Sierra: System Preferences -> Accessibility -> Display -> Invert colors
Aliases
Run them from the command line. Maybe make your screen black and white at night or invert colors for screencasts or working in sunligh.
alias togglegrayscale=’osascript /Users/gcr/util/sspadtogglegrayscale.scpt’
alias invertcolors=’osascript /Users/gcr/util/sspadtogglecolors.scpt’
If you want to lock and unlock your files from the command line using Finder instead of using chmod
there here are two aliases to do it:
alias flock=’chflags -R uchg’
alias funlock=’chflags -R nouchg’
Ever wonder how wifi devices talk to each other when they don’t know that you are listening?
Continue reading “Map And Track Wi-Fi Networks You’re Not Connected To”
This recipe lets you run Docker within Docker.
You might have first used UNIX a long ago but if you haven’t then here is x86 port to try it for the first time pretty easily on a virtual machine.
Start exploring using commands cat ~cd
ed
diff
egrep
file
pwd
size
.
cd /etc
pwd
file passwd
cat passwd
UNIX’ers: how do I use less
or more
to preview a file?
I can’t find the git
2.10 binary so I run
which git
/usr/local/bin/git
Excellent, found it.
And then I check it’s version to verify I am looking at the right version
/usr/local/bin/git –version
git version 2.21.0
Oops that isn’t what I wanted.
There must be another git
getting loaded earlier in the search path.
Here is how to find out where all copies of git
live
type -a git
git is /usr/local/bin/git git is /usr/local/bin/git git is /usr/bin/git
Look for the right git
at version 2.10
/usr/local/bin/git –version
/usr/bin/git –version
git version 2.21.0 git version 2.14.3 (Apple Git-98)
I want the second one.
That is how to track down the location of a binary file on macOS that appears multiple times in the search path.