Skip to content

Instantly share code, notes, and snippets.

@sysrex
sysrex / setup.sh
Created October 1, 2025 13:04
Update and install docker on ubuntu
#!/usr/bin/env bash
set -euo pipefail
# -----------------------------
# Ubuntu Update + Docker Install
# -----------------------------
# - Updates & upgrades the system
# - Installs Docker Engine from Docker's official repo
# - Enables & starts Docker
# - Optionally adds the current user to the docker group
@sysrex
sysrex / .bashrc
Last active June 25, 2025 10:11 — forked from vsouza/.bashrc
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/opt/homebrew/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@sysrex
sysrex / functions.zsh
Last active June 4, 2025 10:29
My always used functions.zsh
function ghpr() {
if [ -z "$1" ]; then
echo "Usage: ghpr <pr-number>"
return 1
fi
local pr_number=$1
local branch_name="pr-${pr_number}"
# Fetch the PR from origin
@sysrex
sysrex / sources.list
Last active August 30, 2024 17:34
apt
deb [arch=amd64] http://ftp.uk.debian.org/debian/ buster main contrib non-free
deb-src [arch=amd64] http://ftp.uk.debian.org/debian/ buster main contrib non-free
deb [arch=amd64] http://ftp.uk.debian.org/debian/ buster-updates main contrib non-free
deb-src [arch=amd64] http://ftp.uk.debian.org/debian/ buster-updates main contrib non-free
deb [arch=amd64] http://security.debian.org/ buster/updates main contrib non-free
deb-src [arch=amd64] http://security.debian.org/ buster/updates main contrib non-free
@sysrex
sysrex / gist:4fa6fb1ce9ecce60079f126a8e3c6a01
Created September 29, 2023 17:57
Install containers on windows
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1" -o install-docker-ce.ps1
.\install-docker-ce.ps1
@sysrex
sysrex / debian docker init
Last active May 9, 2022 19:45
Cloud init script to install docker and docker compose debian 10
#cloud-config
groups:
- docker
users:
- default
# the docker service account
- name: docker-service
groups: docker
package_upgrade: true
packages:
set nocompatible
filetype off
syntax on
set background=dark
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'Xuyuanp/nerdtree-git-plugin'
@sysrex
sysrex / .tmux.conf.local
Created February 28, 2020 13:17
Gpakosz tmux with Dracula colours
tmux_conf_new_window_retain_current_path=false
tmux_conf_new_pane_retain_current_path=true
tmux_conf_new_pane_reconnect_ssh=false
tmux_conf_new_session_prompt=false
tmux_conf_theme_24b_colour=true
tmux_conf_theme_window_fg='default'
tmux_conf_theme_window_bg='default'
tmux_conf_theme_highlight_focused_pane=false
# focused pane colours:
@sysrex
sysrex / lambda.py
Created October 27, 2019 11:41
Python 3 Lambda script
import collections
import datetime
import time
import sys
today = datetime.date.today()
today_string = today.strftime('%Y/%m/%d')
delete_after_days = 2 # Delete snapshots after this many days
@sysrex
sysrex / keybase.md
Last active September 2, 2024 18:32

Keybase proof

I hereby claim:

  • I am sysrex on github.
  • I am sysrex (https://keybase.io/sysrex) on keybase.
  • I have a public key ASCcuaIucx1ha5Xncdv3Tl_o6U9uolpM3BVFB4hdlJWo3wo

To claim this, I am signing this object: