View get-ec2-info.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws ec2 describe-instances --query 'Reservations[*].Instances[*].[InstanceId,State.Name,InstanceType'] |jq -r '.[][] | @csv' >>/tmp/ec2.csv |
View get-opensearch-info.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#export AWS_PAGER=""; | |
# for i in $(aws opensearch list-domain-names |jq -r '.DomainNames[].DomainName') | |
# do | |
# aws opensearch describe-domains --domain-name $i --query 'DomainStatusList[*].[EngineVersion,ClusterConfig.InstanceType,ClusterConfig.InstanceCount,EBSOptions.VolumeType,EBSOptions.VolumeSize]' | |
# done | |
export AWS_PAGER="" |
View bumpme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fri Oct 18 04:03:21 UTC 2019 |
View keybase.md
Keybase proof
I hereby claim:
- I am bfrancom on github.
- I am bfrancom (https://keybase.io/bfrancom) on keybase.
- I have a public key ASA9v4gXnzJzx6RyLdvFoBCy_f0caEW3Zbt1xl68DqEbXQo
To claim this, I am signing this object:
View openbsd_volume_percentage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Node.js script which calculates OpenBSD Volume percentage for the master output | |
//Only calculates the right channel, and assumes both channels are equal | |
//I use this with i3 + i3bar + conky | |
const spawn = require('child_process').spawn; | |
const mixerctl = spawn('mixerctl', ['-v', 'outputs.master']); | |
mixerctl.stdout.on('data', (data) => { | |
var arr = data.toString().split(","); | |
var lastNum = arr[1].replace(/(\r\n|\n|\r)/gm,""); | |
var perc = (lastNum/226*100); | |
var wholeNum = Math.floor(perc); |
View conky.rc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#In .conkyrc, I have a line like: | |
{ "full_text" : "${execi 301 node /home/bob/weather.js}" , "color" : "\#ffffff" }, | |
#see result in attached image |