This file contains hidden or 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
- |
This file contains hidden or 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
package main | |
import ( | |
"context" | |
"fmt" | |
"net" | |
"sort" | |
"strings" | |
"time" | |
) |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'tf/hcl' | |
require 'open3' | |
def terraform_fmt(input) | |
o, s = Open3.capture2(*%w[terraform fmt -], :stdin_data=>input) | |
return o | |
end |
This file contains hidden or 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 | |
set -e -o pipefail -u | |
if [ "$#" -lt 1 ]; then | |
echo "Attaches files to the latest tag in github" 1>&2 | |
echo "Usage: $0 [files...]" 1>&2 | |
exit 1 | |
fi |
This file contains hidden or 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
# wget https://userstyles.org/styles/userjs/142096/dark-whatsapp-theme-by-mew.user.js -O Downloads/dark-whatsapp-theme-by-mew.user.js | |
wget https://userstyles.org/styles/userjs/142096/dark-whatsapp-by-vednoc.user.js -O Downloads/dark-whatsapp-by-vednoc.user.js | |
wget https://raw.githubusercontent.com/DocBox12/WhatsApp-nativefier-fix/master/whatsapp_fix.js -O Downloads/whatsapp_fix.js | |
cat Downloads/dark-whatsapp-by-vednoc.user.js Downloads/whatsapp_fix.js > Downloads/whasapp_inject.js | |
nativefier -n "whatsapp" --inject Downloads/whasapp_inject.js --tray --title-bar-style hidden --width 500 --height 400 --single-instance https://web.whatsapp.com/ nativefier-apps/ |
This file contains hidden or 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
# https://ubuntu.com/blog/how-to-sign-things-for-secure-boot | |
# generate the key and enroll it | |
cd /var/lib/shim-signed/mok | |
cat <<EOF > openssl.cnf | |
# This definition stops the following lines choking if HOME isn't | |
# defined. | |
HOME = . | |
RANDFILE = \$ENV::HOME/.rnd | |
[ req ] | |
distinguished_name = $(hostname) |
This file contains hidden or 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
get_token_ttl() { | |
if [ -n "${AWS_CREDENTIAL_EXPIRE}" ]; then | |
if date --version 2>&1 | grep -q GNU; then | |
token_epoch="$(date -d "${AWS_CREDENTIAL_EXPIRE}" +%s)" | |
elif date --version 2>&1 | grep -q ymwdHMS; then | |
token_epoch="$(date -j -u -f '%Y-%m-%dT%H:%M:%SZ' "${AWS_CREDENTIAL_EXPIRE}" +%s)" | |
fi | |
current_epoch="$(date +%s)" | |
echo "$(( token_epoch - current_epoch ))" | |
fi |
This file contains hidden or 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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
This file contains hidden or 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 | |
# s3-compare-last-versions.sh | |
set -eu -o pipefail | |
if [[ $# -ne 2 ]]; then | |
echo "Usage: `basename $0` <bucketName> <fileKey> " | |
exit 1 | |
fi |
This file contains hidden or 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 | |
SCRIPT="$0" | |
set -eu -o pipefail | |
help() { | |
cat <<EOF | |
Executes a cf curl and iterates across all the pages returned by CF, | |
aggregating the resources in a big json. |