Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View valter-silva-au's full-sized avatar

Valter Silva valter-silva-au

View GitHub Profile
@valter-silva-au
valter-silva-au / init.sh
Created October 13, 2022 13:07
Initialize a project with AWS Terraform Dev Container
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
git clone --branch=main --depth=1 git@github.com:awslabs/aws-terraform-dev-container.git
mv aws-terraform-dev-container/.devcontainer .devcontainer
rm -rf aws-terraform-dev-container
@valter-silva-au
valter-silva-au / daily-downloads.sh
Created November 18, 2021 00:30
Create a daily directory to keep downloads organized
#!/usr/bin/env bash
set -eu
echo "=== START: ORGANIZE FILES AND DIRECTORIES $(date)"
YEAR=$(date "+%Y")
MONTH=$(date "+%m")
DAY=$(date "+%d")
#!/bin/bash
# Helps keeping your homebrew packages up-to-date
# If you have any issues with 'permission denied' to cleanup old packages
# https://stackoverflow.com/a/59608792/523168
# sudo chown -R $(whoami) /usr/local/Cellar/
echo "=== brew update ==="
brew update
if [ -f $(brew --prefix)/etc/bash_completion.d/git-completion.bash ]; then
. $(brew --prefix)/etc/bash_completion.d/git-completion.bash
fi
complete -C /usr/local/bin/aws_completer aws
Follow this [tutorial](https://gist.github.com/nickautomatic/02ccb76292f7f8d9767e)
See the attached screenshots as examples.
Bootstrap MacOS
Install Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Home-brew-cask:
brew tap caskroom/cask
Install brew packages:
brew install astyle
@valter-silva-au
valter-silva-au / keybase.md
Created February 21, 2018 13:40
keybase.md

Keybase proof

I hereby claim:

  • I am tech-vsilva on github.
  • I am valtersilva (https://keybase.io/valtersilva) on keybase.
  • I have a public key ASC9yQnfmQiClmKe9tLp-c0du33_Ry_VewO8s7JmDA4vjAo

To claim this, I am signing this object:

#!/bin/bash
set -x
# Credits: https://stackoverflow.com/a/37939589
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
JENKINS_DIR="/usr/lib/jenkins"
CURRENT_JENKINS_VERSION=$(java -jar "${JENKINS_DIR}/jenkins.war" --version)
JENKINS_VERSION=$(curl -s http://updates.jenkins-ci.org/download/war/ | grep "href='/download/war" | awk '{ print $3 }' | head -n 1 | sed "s,href='/download/war/,," | sed "s,</a></td></tr>,," | tr "/" "\n" | head -n 1
@valter-silva-au
valter-silva-au / install-intellij.sh
Created August 28, 2017 12:51
How to install Intellij Community Edition with homebrew-cask
$ brew cask install caskroom/cask/intellij-idea-ce