Skip to content

Instantly share code, notes, and snippets.

Andrés Felipe Piñeros AndresPineros

  • Cali, Colombia
Block or report user

Report or block AndresPineros

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AndresPineros
AndresPineros / wait-centos.sh
Last active Mar 11, 2018
Wait for it for Centos
View wait-centos.sh
#!/bin/bash
HOST=$1
PORT=$2
TIMEOUT=$3
INITIAL_WAIT=$4
if [ -z "$TIMEOUT" ]; then TIMEOUT=15; fi
if [ ! -z "$INITIAL_WAIT" ]; then sleep $INITIAL_WAIT; fi
currentSeconds=0
@AndresPineros
AndresPineros / developmentEnv.sh
Last active Sep 12, 2018
Dependencies for development environment
View developmentEnv.sh
#!/bin/bash
# System dependencies
sudo apt-get update -y
# System tools
sudo apt-get install terminator tree vim wget curl -y
sudo apt-get install --no-install-recommends gnome-panel -y
sudo apt-get install nautilus-open-terminal -y
@AndresPineros
AndresPineros / dockerbackup.sh
Last active Jan 2, 2018
Docker Named Volume Backup tool
View dockerbackup.sh
#!/bin/bash
action=$1 #Backup or restore
volume_name=$2 #The name of the docker-compose volume to restore or backup.
output_dir=$3 #Where to read from (if restore) or to write to (if backup) the backup.
file_name=$4 #How the backup is (if restore) or will (if backup) be named.
function usage() {
echo "Usage: db (backup|restore) volume_name output_input_dir file_name"
exit
@AndresPineros
AndresPineros / Compose wait-for-it
Created Oct 4, 2017
usage: wait.sh 30 google.com:80 yahoo.com:80
View Compose wait-for-it
#!/bin/bash
# Use this script to test if a given TCP host/port are available
cmdname=$(basename $0)
timeout=30
if [[ $1 =~ ^[0-9]+$ ]]; then
timeout=$1
shift 1
fi
while [[ $# -gt 0 ]]; do
You can’t perform that action at this time.