Skip to content

Instantly share code, notes, and snippets.

View caseycs's full-sized avatar

Ilia Kondrashov caseycs

View GitHub Profile
#!/bin/sh
# wrapper to format hcl passed via stdin
# user for for VSCcode Custom Local Formatters extension (https://marketplace.visualstudio.com/items?itemName=jkillian.custom-local-formatters)
# or any other editor relying on stdin/stdout for formatting, like Zed
# relevant issues:
# * https://github.com/gruntwork-io/terragrunt/issues/1037
# * https://github.com/gruntwork-io/terragrunt/issues/2926
TMPFILE=$(mktemp)
cat - > $TMPFILE
terragrunt hclfmt --terragrunt-hclfmt-file $TMPFILE
/usr/local/bin/gs -sDEVICE=pngalpha -o logo_%03d.png -dUseCropBox -sDEVICE=pngalpha -r600 logo.pdf
@caseycs
caseycs / gist:e407f2e05e2de092397c
Last active August 29, 2015 14:22
DigitalOcean Debian 7.0 x64 bootstrap script, inspired by Linode StackScripts
#!/bin/sh
# usage: wget -O - httpshttps://gist.githubusercontent.com/caseycs/e407f2e05e2de092397c/raw/gistfile1.sh | sh
function user_add_sudo {
# Installs sudo if needed and creates a user in the sudo group.
#
# $1 - Required - username
# $2 - Required - password
USERNAME="$1"
USERPASS="$2"