Skip to content

Instantly share code, notes, and snippets.

View joaocgduarte's full-sized avatar
🐢

João Duarte joaocgduarte

🐢
  • Lisbon, Portugal
View GitHub Profile
@joaocgduarte
joaocgduarte / .docker-aliases
Created September 6, 2021 23:10
docker-aliases
function dnames-fn {
for ID in `docker ps | awk '{print $1}' | grep -v 'CONTAINER'`
do
docker inspect $ID | grep Name | head -1 | awk '{print $2}' | sed 's/,//g' | sed 's%/%%g' | sed 's/"//g'
done
}
function dip-fn {
echo "IP addresses of all named running containers"
#!/bin/bash
check_exit_status() {
if [ $? -eq 0 ]
then
echo
echo "Success"
echo
else
@joaocgduarte
joaocgduarte / bootstrap.sh
Last active September 8, 2021 00:29
Ubuntu bootstrap and scripts
#!/bin/bash
#
# Bootstrap script for setting up a new Ubuntu machine
#
# This should be idempotent so it can be run multiple times.
#
# Notes:
# - Before running, check in this file:
# - latest version of NVM,