Install the OpenSSL on Debian based systems
sudo apt-get install openssl| #!/usr/bin/env bash | |
| # retrieve list of closed github PRs, compare to running Ecs services, stop and delete services and deregister task-definitions | |
| # settings | |
| github_token='YOURGITHUBTOKEN' # github token with access to organization pull-requests | |
| github_repo='SOMEORG/SOMEREPO' # org/repo from which to retrieve pullrequest status | |
| cluster_arn='SOME_ECS_CLUSTER' # full arn or shortname of Ecs cluster | |
| # retrieve list of closed pull-requests | |
| closed_pulls="^($(curl -s -G -d access_token="$github_token" https://api.github.com/repos/"$github_repo"/pulls?state=closed | jq .[].number | sort -n | paste -sd'|' -))$" |
| # AWS functions | |
| function instances() { | |
| if [[ $1 == '--ip' || $1 == '--ips' ]]; then | |
| filter='.[PrivateIpAddress]' | |
| output='text' | |
| shift | |
| elif [[ $1 == '--id' || $1 == '--ids' ]]; then | |
| filter='.[InstanceId]' | |
| output='text' | |
| shift |
| -- Awareness replacement | |
| local awareness = hs.menubar.new() | |
| function setAwarenessDisplay(timerSecs) | |
| local timerPercent = math.floor(timerSecs / 3600 * 100) | |
| awareness:setTitle(tostring(timerPercent)) | |
| end | |
| awakeTimer = hs.timer.doAfter(3600, function() | |
| hs.alert("Have some rest", 5) | |
| end) |
I hereby claim:
To claim this, I am signing this object: