Hello and welcome to my Shortcuts Catalog!
This is a public resource designed to help people get started with Siri Shortcuts and the Shortcuts app.
It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.
Enjoy!
- Open Automator.app
- Create new Quick Action
- Select Run AppleScript
- Add this:
set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
set inputVolume to 100
display notification "Volume set to 100" with title "✅ Microphone is on"
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.
| # 1. First of all of course get Manjaro: | |
| https://manjaro.org/get-manjaro/ | |
| # I recommend using Etcher to copy the image to your USB: | |
| https://etcher.io/ | |
| # 2. Before installing make sure: | |
| # - Secure boot is disabled in BIOS | |
| # - Your SSD, HDD or NVME drive is set to AHCI instead of RAID | |
| # - Fastboot should be on Auto or minimal, but this shouldn't matter to much |
| package main | |
| import ( | |
| "io" | |
| "log" | |
| "net" | |
| "time" | |
| ) | |
| func reader(r io.Reader) { |
| -- show queries that are blocked by other queries (>= 9.6) | |
| SELECT pid, | |
| usename, | |
| pg_blocking_pids(pid) as blocked_by, | |
| query AS blocked_query | |
| FROM pg_stat_activity | |
| WHERE cardinality(pg_blocking_pids(pid)) > 0; | |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(query_start, clock_timestamp()), usename, current_query |
| #/bin/bash | |
| export MY_EXPORTED_VAR="Boo Yeah!" | |
| MY_NON_EXPORTED_VAR="You won't see this one!" | |
| # This script was inspired by the answer to the question in | |
| # http://unix.stackexchange.com/questions/50692/executing-user-defined-function-in-a-find-exec-call | |
| runFindCommand(){ | |
| # 'myFunct "$@"' will call the function with the arguments passed into the shell |