Skip to content

Instantly share code, notes, and snippets.

@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 / get-spotify.sh
Created May 25, 2023 09:53
Install/Uninstall Spotify Client Linux
#!/bin/bash
# Install/Uninstall Spotify Client Linux
# Tested on Ubuntu 22.04
# install spotify
_install() {
if ! command -v spotify >/dev/null; then
sudo apt-get install curl libcanberra-gtk-module software-properties-common apt-transport-https gnupg2 ubuntu-keyring -y
curl -sS https://download.spotify.com/debian/pubkey_7A3A762FAFD4A51F.gpg | sudo gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/spotify.gpg
#!/bin/bash
# Install/Uninstall Docker Compose Stand-Alone Binary Linux
# Tested on Ubuntu 22.04
_version="$(curl --silent "https://api.github.com/repos/docker/compose/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")' )"
_install() {
if ! [ -x "$(command -v docker-compose)" ]; then
sudo curl -L https://github.com/docker/compose/releases/download/${_version}/docker-compose-$(uname -s)-$(uname -m) \
@eplord
eplord / get-docker-compose.sh
Last active May 25, 2023 09:58
Install/Uninstall Docker Compose Stand-Alone Binary Linux
#!/bin/bash
# Install/Uninstall Latest Docker Compose Stand-Alone Binary Linux
# Tested on Ubuntu 22.04
version=""
latest="$(curl --silent "https://api.github.com/repos/docker/compose/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")' )"
_version=${version:-$latest}
@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"