Skip to content

Instantly share code, notes, and snippets.

@eplord
eplord / ubuntudocker.sh
Created April 19, 2023 18:06 — forked from fredhsu/ubuntudocker.sh
Shell script to install Docker CE on ubuntu and post-install user configuration
#!/bin/bash
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
@eplord
eplord / hardenUbuntu.sh
Created May 22, 2023 23:41 — forked from lrobert/hardenUbuntu.sh
Ubuntu Base Server Configuration/Hardening Script
#!/bin/bash
#
# Lee Robert's Base Ubuntu Installation script for use on Digital Ocean (Or any other ubuntu install really.)
# Made and tested with Ubuntu 13.04 64bit
#
# Steps:
# 01. Secure Root User
# 02. Make .bashrc print out pretty colors (and root's prompt will be red)
# 03. Create a local user
# 04. Update sudoers file so only root + local user can use sudo
@eplord
eplord / pipewire.md
Created May 23, 2023 01:23 — forked from the-spyke/pipewire.md
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

@eplord
eplord / mount-root
Created May 25, 2023 08:22 — forked from rubo77/mount-root
Mounts all needed mount points to change into another system from within a live-CD
#!/bin/bash
# mounts all needed mount points to change into another system from within a live-CD
#-------------- Author: -------------#
# by Ruben Barkow (Rubo77)
if [ "$(whoami &2>/dev/null)" != "root" ] && [ "$(id -un &2>/dev/null)" != "root" ] ; then
echo "You must be root to run this script!"; echo "use 'sudo !!'"; exit 1
fi
@eplord
eplord / README.md
Last active December 17, 2023 02:05 — forked from bf4/README.md
clone_all repos

Clone all repos

Install as follows

\curl -sSL https://gist.github.com/bf4/c19f041bb0887476dfaa/download | \
  tar xzvf - --include '*setup' -O | bash

optionally first set PROJECT_DIR and PROJECT_CLONE_URL in your ~/.profile

@eplord
eplord / chroot-to-pi.sh
Created May 26, 2023 12:40 — forked from htruong/chroot-to-pi.sh
Chroot to pi sd card
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued
@eplord
eplord / bash_install.sh
Created July 13, 2023 15:14 — forked from weehongkoh/README.md
Download Latest Zsh, Go and Python Package With Bash Script
# Download ZSH
bash -c "$(curl -fsSL https://gist.githubusercontent.com/weehongayden/e56d8161fa47e3ac8416ad8340ee3f82/raw/ff75af227e14b5301c0830abb50e21e6d3e95c3f/zsh_installer.sh)"
# Download Latest Go
bash -c "$(curl -fsSL https://gist.githubusercontent.com/weehongayden/e56d8161fa47e3ac8416ad8340ee3f82/raw/0d3a20a82afe98e84efdac3d775c8d4b2b565145/go_installer.sh)"
# Download Latest Python 3
bash -c "$(curl -fsSL https://gist.githubusercontent.com/weehongayden/e56d8161fa47e3ac8416ad8340ee3f82/raw/0f5baaa1cade757f54ca6a9f0fd6fb01e6db73de/python_installer.sh)"
@eplord
eplord / install_golang.sh
Created July 13, 2023 15:14 — forked from jniltinho/install_golang.sh
Install Golang on Linux
#!/bin/bash
## Install Golang 1.19 64Bits on Linux (Debian|Ubuntu|OpenSUSE|CentOS)
## http://www.linuxpro.com.br/2015/06/golang-aula-1-instalacao-da-linguagem-no-linux.html
## Run as root (sudo su)
## Thank's @geosoft1 | @gwmoura
GO_URL="https://go.dev/dl"
GO_VERSION=${1:-"1.19"}
GO_FILE="go$GO_VERSION.linux-amd64.tar.gz"
@eplord
eplord / get_go.sh
Created July 13, 2023 15:15 — forked from Zate/get_go.sh
Shell script to download and install latest golang
#! /bin/bash
# [get_golang.sh](https://gist.github.com/n8henrie/1043443463a4a511acf98aaa4f8f0f69)
# Download latest Golang release for AMD64
# https://dl.google.com/go/go1.10.linux-amd64.tar.gz
set -euf -o pipefail
# Install pre-reqs
sudo apt-get install python3 git -y
o=$(python3 -c $'import os\nprint(os.get_blocking(0))\nos.set_blocking(0, True)')
@eplord
eplord / .docker_aliases
Created July 13, 2023 23:50 — forked from cjus/.docker_aliases
Docker aliases
#!/bin/sh
alias dm='docker-machine'
alias dmx='docker-machine ssh'
alias dk='docker'
alias dki='docker images'
alias dks='docker service'
alias dkrm='docker rm'
alias dkl='docker logs'
alias dklf='docker logs -f'