Skip to content

Instantly share code, notes, and snippets.

@iliion
iliion / install_zellij
Created January 26, 2024 15:33
Install [Zellij](https://zellij.dev/) multiplexer
#!/bin/env bash
if [ "$EUID" -ne 0 ]; then
echo "Installing system-wide apps requires sudo privileges. Do you have any?"
exit 1
fi
# Create a temporary directory
temp_dir=$(mktemp -d)
@iliion
iliion / install_docker_CentOS7.md
Created November 12, 2021 16:45
Install Docker Engine {CentOS7}

Uninstall old versions

sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine
@iliion
iliion / install_pg.sh
Created July 6, 2021 09:23
PostgreSQL installation { Ubuntu }
#! /bin/bash
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install postgresql
@iliion
iliion / sync_date.sh
Created June 16, 2021 13:30
Update date/time in ubuntu
#! /bin/bash
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
@iliion
iliion / nuke_docker.sh
Last active December 23, 2021 13:18
Delete container, images, volumes, networks from docker
#! /bin/bash
# Stop all containers
docker stop `docker ps -aq `
# Remove all containers
docker rm `docker ps -aq `
# Remove all images
docker rmi -f `docker images -aq `
@iliion
iliion / install_docker_compose.md
Last active November 12, 2021 17:33
Install Docker compose { Ubuntu, CentOS7 }

INSTALL DOCKER COMPOSE

Download the current stable release of Docker Compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Apply executable permissions to the binary

@iliion
iliion / docker_post_install.md
Last active June 8, 2021 10:22
Post installation Docker { Ubuntu }

POST INSTALLATION

Manage Docker as a non-root user

sudo groupadd docker

sudo adduser dockermanager

sudo adduser dockermanager docker

@iliion
iliion / install_docker.md
Last active June 8, 2021 10:26
Install Docker { Ubuntu }

Uninstall previous versions

sudo apt-get remove docker docker-engine docker.io containerd runc

INSTALL DOCKER

sudo apt-get update -y
@iliion
iliion / install-go.sh
Created May 31, 2021 19:07
{Debian 8|9|10} Install GO
#!/bin/sh
# Download Latest Go Binary
wget https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz
# Install Go Language
sudo tar -C /usr/local -xzf go1.13.4.linux-amd64.tar.gz
# Add /usr/local/go/bin to the PATH
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile
@iliion
iliion / install-node.sh
Last active May 30, 2021 22:24
Install Node {Debian 8/9/10}
#!/bin/sh
# LTS Release
sudo apt-get install curl software-properties-common
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
# Install Node.js
sudo apt-get install -y nodejs npm