I hereby claim:
- I am ukn on github.
- I am ukn (https://keybase.io/ukn) on keybase.
- I have a public key whose fingerprint is 53CB D2D1 9D82 BA8C 8D24 E51E 9B58 DE68 310F F0FE
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| # | |
| # Resize active window to 1/3 of the screen and position it in the middle, right or left part of the display | |
| # Tested with XFCE (xserver) and ultra wide monitor (3440x1440) | |
| # | |
| # based on: https://askubuntu.com/questions/104155/center-a-window-via-command-line#answer-571711 | |
| # Can this be calculated automagically? | |
| taskBarHeight=63 |
| #!/usr/bin/env bash | |
| currect_factor=`xfconf-query -c xsettings -p /Gdk/WindowScalingFactor` | |
| echo Factor: $currect_factor | |
| if [ "${currect_factor}" -eq "1" ]; then | |
| echo "Change it to 2" | |
| new_factor=2 | |
| else | |
| echo "Change it to 1" | |
| fi |
| #!/bin/bash | |
| set -e | |
| export CONFIG_MODULE_SIG=n | |
| export CONFIG_MODULE_SIG_ALL=n | |
| # For current kernel | |
| export KERNELRELEASE=$(cat /proc/version | awk '{print $3}') | |
| temp_dir=$(mktemp -d) | |
| echo "Installing FacetimeHD camera for $KERNELRELEASE" |
| #!/bin/bash | |
| # Updates Cloudflare dns record | |
| # when your home IP changes | |
| # Put in in cron with desired frequency | |
| # but don't abuse WTF service (they throttle anyway) | |
| set -e | |
| API_TOKEN=YOUR_API_TOKEN_HERE |
| #!/bin/bash | |
| set -e | |
| # Don't use in PROD! | |
| # Script params: | |
| # ES_URL - https://your-elasticseach-url.local | |
| # INDEX - your-index-name | |
| ES_URL=$1 | |
| INDEX=$2 | |
| SUFFIX=0 |
| #!/usr/bin/env node | |
| /* | |
| Deletes servers from New Relic Server app that were last seen before cutoff date | |
| */ | |
| const https = require("https") | |
| const cutoff = new Date("2017-10-15T00:00:00.001") | |
| const filter = 'filter[reported]=false&sort[health_status]=false' | |
| var promises = [] |
| ss() { | |
| if [[ -z ${2+x} ]]; then | |
| ssh ${1} "curl -s localhost:8500/v1/catalog/services | \ | |
| jq -rc 'keys | .[]' | while read i; do curl -s localhost:8500/v1/health/service/\${i} | jq -r '.[] | .Checks[] | select(.CheckID != \"serfHealth\") | .ServiceName + \" \" + .CheckID + \" \" + .Status'; done | column -t -x" | |
| else | |
| ssh ${1} "curl -s localhost:8500/v1/health/service/${2} | jq -r '.[] | .Checks[] | select(.CheckID != \"serfHealth\") | .CheckID + \"\t\" + .Status + \"\t\t\" + .Output'" | |
| fi | |
| } |
| awsls(){ | |
| if [ -z ${1+x} ]; then | |
| temp=`aws ec2 describe-instances` | |
| else | |
| temp=`aws ec2 describe-instances --profile ${1}` | |
| fi | |
| # All tags version | |
| # aws ec2 describe-instances | jq -r '.Reservations[].Instances[] | | select (.State.Name != "terminated") | .InstanceId + "\t" + .PrivateIpAddress + "\t" + .PublicIpAddress + "\t" + .InstanceType + "\t" + (reduce.Tags[] as $tag (""; . + $tag.Key + "=" + $tag.Value + " "))' | |
I hereby claim:
To claim this, I am signing this object: