Cmdline

Download the latest Github release using command line

2022-01-17

For personal reference: Download the latest GitHub Releases asset using common command line tools: Update the url accordingly. The uname | awk subcmds will output 'linux'|'darwin'. $ curl -s https://api.github.com/repos/alphauslabs/bluectl/releases/latest | \ jq -r ".assets[] | select(.name | contains("$(uname -s | awk '{print tolower($0)}')")) | .browser_download_url" | \ wget -i -

Cmdline · Download · Github · Release

1 minute

Setting alarm from commandline

2021-11-08

This is just a quick one. Although I use Gnome Clocks occassionally, most of the time I set an alarm via the commandline. OS is POP_OS!, using VLC: $ sleep 10m && \ cvlc ~/alarm.mp3 –play-and-exit && \ notify-send 'alarm done'

Alarm · Cmdline · Commandline · Gnome · Linux

1 minute

Extract gRPC-generated functions to a list

2021-07-31

This might be hacky and there might be a proper way to do this but recently, I needed to generate all the functions’ gRPC-generated full names from our protobuf definitions. This is part of our RBAC module that needs to filter gRPC function calls. I got the list from our generated Go client using the following command(s): Main command: $ grep -o -R -i -E '"/blueapi..*"' . | awk -F':' '{gsub(/"/, "", $2); print "-", substr($2, 2);}' | sort | uniq # Actual commands; save as yaml: $ echo "functions:" > /tmp/funcs.

Cmdline · Golang · Grpc · Grpc-Gateway

1 minute