This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tech:macos:start [2019/09/08 14:23] rk4n3 |
tech:macos:start [2019/11/09 11:13] (current) rk4n3 |
||
---|---|---|---|
Line 112: | Line 112: | ||
===== CLI Tips + Tricks ===== | ===== CLI Tips + Tricks ===== | ||
- | ==== JSON Pretty-Printing ==== | + | ==== Pretty-Printing ==== |
=== Pretty-Print JSON from a file ... === | === Pretty-Print JSON from a file ... === | ||
<code>cat unformatted.json | python -m json.tool</code> | <code>cat unformatted.json | python -m json.tool</code> | ||
- | |||
=== Pretty-Print JSON from the clipboard ... === | === Pretty-Print JSON from the clipboard ... === | ||
<code>pbpaste | python -m json.tool</code> | <code>pbpaste | python -m json.tool</code> | ||
- | |||
=== Pretty-Print XML from the clipboard ... === | === Pretty-Print XML from the clipboard ... === | ||
<code>pbpaste | xmllint --format -</code> | <code>pbpaste | xmllint --format -</code> | ||
+ | |||
+ | ===== Desktop/GUI Tips + Tricks ===== | ||
+ | ==== Resize a window to 1920x1080 ==== | ||
+ | Open ''Applications'' -> ''Utilities'' -> ''Script Editor'', paste this, and hit the play button: | ||
+ | <code> | ||
+ | tell application "Firefox" | ||
+ | activate | ||
+ | set the bounds of the first window to {100,100,2020,1180} | ||
+ | end tell | ||
+ | </code> | ||
+ | |||