Skip to content

Instantly share code, notes, and snippets.

View sgnconnects's full-sized avatar

Zakhele Dlamini sgnconnects

View GitHub Profile
@sgnconnects
sgnconnects / setup.sh
Created June 17, 2023 08:20 — forked from jescalan/setup.sh
Environment Setup
#!/bin/sh
# --------------------------------------------------------------------------------------
# Sets up your computer with the tools you need to develop in a modern ruby environment.
# --------------------------------------------------------------------------------------
# This install includes:
# - homebrew
# - rbenv
# - ruby-build
# - ruby 1.9.3-p125
@sgnconnects
sgnconnects / xavier-lxc-centos7.md
Created June 17, 2023 08:13 — forked from fwyzard/xavier-lxc-centos7.md
Install CentOS 7 in an LXC/LXD container on an NVIDIA Xavier

Install and configure LXD

Install LXD

sudo snap install lxd

Perform the initial configuration

sudo lxd init
@sgnconnects
sgnconnects / prouting.sh
Created June 14, 2023 22:19 — forked from oskar456/prouting.sh
A simple script to set up policy routing on linux. It's stateless and detects everything automatically, so all you have to do is to run it after every network subsystem change. I run it in postup and postdown hooks in Gentoo network configuration file.
#!/bin/bash
IP="/bin/ip"
function prepare_rt_table() {
local rttables=/etc/iproute2/rt_tables
local iface=$1
[[ "${iface}" = 'lo' ]] && return
if ! egrep -q "\s${iface}\s*"\$ $rttables; then
idx=$(wc -l <$rttables)
@sgnconnects
sgnconnects / prouting.sh
Created June 14, 2023 22:19 — forked from oskar456/prouting.sh
A simple script to set up policy routing on linux. It's stateless and detects everything automatically, so all you have to do is to run it after every network subsystem change. I run it in postup and postdown hooks in Gentoo network configuration file.
#!/bin/bash
IP="/bin/ip"
function prepare_rt_table() {
local rttables=/etc/iproute2/rt_tables
local iface=$1
[[ "${iface}" = 'lo' ]] && return
if ! egrep -q "\s${iface}\s*"\$ $rttables; then
idx=$(wc -l <$rttables)
@sgnconnects
sgnconnects / virtengine-waldur.sh
Created June 14, 2023 11:23 — forked from jaeko44/virtengine-waldur.sh
VirtEngine Waldur Installation Script
#!/bin/bash
yum update -y
yum install -y https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
yum install -y postgresql96-server
/usr/pgsql-9.6/bin/postgresql96-setup initdb
systemctl start postgresql-9.6
@sgnconnects
sgnconnects / VirtEngine Installation
Created June 14, 2023 07:30 — forked from jaeko44/VirtEngine Installation
Install VirtEngine Ubuntu 16.04 & OpenNebula 5.6
Information:
[VirtEngine Website](https://virtengine.com)
[Public Cloud.tc Multi-Provider](https://cloud.tc)
[VirtEngine Installation](https://docs.virtengine.com)
[OpenNebula 5.6 Installation](https://docs.opennebula.org/5.6/deployment/node_installation/kvm_node_installation.html)
# Prep System:
apt-get update
sudo fallocate -l 4G /swapfile
sudo mkswap /swapfile
sudo chmod 600 /swapfile
# "UUID" & create
#SWAP_UUID=`sudo blkid -s UUID /swapfile | grep -Po '[\w*-]*\w'| tail -1`
echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab
sudo swapon -a
#!/bin/sh
# non-interactive kde installer for alpine
# apk add curl && curl -L https://cutt.ly/alpine_kde | sh
echo "I will make Alpine Linux a Desktop Linux.. ."
## Desktop user
@sgnconnects
sgnconnects / README.md
Created May 22, 2023 15:09 — forked from arikfr/README.md
Setting up HTTPS with LetsEncrypt for Redash Docker Deployment
  1. Make sure the domain you picked points at the IP of your Redash server.
  2. Switch to the root user (sudo su).
  3. Create a folder named nginx in /opt/redash.
  4. Create in the nginx folder two additional folders: certs and certs-data.
  5. Create the file /opt/redash/nginx/nginx.conf and place the following in it: (replace example.redashapp.com with your domain name)
    upstream redash {
        server redash:5000;
    }
    
@sgnconnects
sgnconnects / 0-pve.sh
Created May 19, 2023 17:54 — forked from sugoidogo/0-pve.sh
customized install proxmox ve on debian - only tested on buster, bullseye
#!/usr/bin/env bash
# wget -qO 0-pve.sh https://gist.github.com/sugoidogo/4684e4659431e17d15be20171160c1f9/raw/ && bash 0-pve.sh
set -e
export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
function download { wget $* || curl -fLO $*; }
function stream { wget -qO- $* || curl -fsSL $*; }
function package { apt $* || dnf $*; }
echo "This script will download and run the installation script in a screen session"
echo "The installation script will download post-installation scripts to $HOME and reboot the system upon successful installation"