Table of Contents

Tools, Workflow and Resources for Effective Development

Live Online Workshop for ULSA and HSRW by Harley Lara - 2022-10-06

Workshop details:


Demo Scripts Used in the Workshop

Download all the files here: example_files.zip

bash Demo

hello-bash.sh
#!/bin/bash
 
echo "hello bash scripting"

tmux Demo

tmux-fzf.sh
#!/bin/bash
 
# Used the next line to set the list of directories
DIRECTORIES="~/ ~/Documents ~/Desktop"
# Uncommend the next line if you are using a external file
# for track the list of directories
# DIRECTORIES=$(cat ~/EXTERNAL-FILE | tr "\n" " ")
# Note about the external file
#       Format of the file:
#           ~/ 
#           ~/Documents
#           ~/Desktop
#       One directory per line
 
if [[ $# -eq 1 ]]; then
    SELECTED=$1 && [[ "$SELECTED" == '.' ]] && SELECTED="$PWD"
else
    SELECTED=$(find $DIRECTORIES -mindepth 1 -maxdepth 1 -type d | fzf)
fi
 
if [[ -z $SELECTED ]]; then
    exit 0
fi
 
SELECTED_NAME=$(basename "$SELECTED" | tr . _)
SELECTED_NAME=${SELECTED_NAME:0:8}
 
if [[ -n $TMUX ]]; then
    # inside tmux
    tmux switch-client -t "$SELECTED_NAME" || \
    tmux new-session -ds "$SELECTED_NAME" -c "$SELECTED" && \
    tmux switch-client -t "$SELECTED_NAME"
elif [[ -z $TMUX ]]; then
    # outside tmux
    tmux new-session -s "$SELECTED_NAME" -c "$SELECTED" || \
    tmux attach -t "$SELECTED_NAME"
fi

apt - Linux Software Package Manager

install-some-software-packages.sh
#!/bin/bash
 
sudo apt update && \
apt-get install -y \
    build-essential \
    cmake \
    pkg-config \
    libpthread-stubs0-dev
 
sudo apt install -y \
    curl \
    htop \
    python3-pip

Encryption and Decryption with Ansible

Encryption:

$> ansible-vault encrypt FILE_NAME

Decryption:

$> ansible-vault decrypt FILE_NAME

Full list of software in the presentation

Note 1: if the platform is not specified as Windows, Linux or MacOS, consider the software mentioned as Cross-platform (available on all).

Note 2: Linux and MacOS are Unix-based operating systems