Skip to content

Instantly share code, notes, and snippets.

@koaps
koaps / reapy_install.txt
Last active December 11, 2023 06:25
Reapy in Pyenv
# Install pyenv (OSX) - https://github.com/pyenv/pyenv
brew install pyenv
# Install Python build requirements
brew install openssl readline sqlite3 xz zlib tcl-tk
# Install python 3.12.1
PYTHON_CONFIGURE_OPTS="--disable-ipv6 --enable-optimizations --enable-shared" pyenv install 3.12.1
# Set global version
upstream warehouse_inventory {
zone inventory_service 64k;
server 10.0.0.1:80;
server 10.0.0.2:80;
server 10.0.0.3:80;
}
upstream warehouse_pricing {
zone pricing_service 64k;
server 10.0.0.7:80;
@koaps
koaps / git-clearHistory
Created April 26, 2021 17:43 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@koaps
koaps / Raspberry Pi 4 Arm64 Kernel Cross-Compile.md
Created March 22, 2021 07:49 — forked from G-UK/Raspberry Pi 4 Arm64 Kernel Cross-Compile.md
Building the Raspberry Pi 4 Arm64 Linux Kernel

The Raspberry Pi foundation have now released a beta version of an official 64-bit Kernel which can be installed using the rpi-update script. The rpi-update script can be found at https://github.com/Hexxeh/rpi-update/blob/master/rpi-update or through the Raspbian repositories

Introduction

The objective of these instructions is to build a stock 64bit Linux Kernel for use on the Raspberry Pi 4B on a Debian x64 machine (Windows Subsystem for Linux in my case), and deploy on the Raspberry Pi.

Notes:

  • Transfer to Pi is using my NAS in this example, replace with shared drive/memory stick etc. as required.
    • (N: drive on Windows and /mnt/NAS on Linux in this example).
  • For a specific Kernel version replace the 4.19 with the wanted version in the git clone command.
  • Greater than 3GB RAM only currently available on Kernel 4.19
@koaps
koaps / 01-pre-install.sh
Created February 16, 2021 04:58 — forked from xenophonf/01-pre-install.sh
K3s on Ubuntu 20.04 with root on encrypted ZFS
#!/bin/sh
# Run as user `ubuntu` from the Ubuntu Desktop installer's live environment.
sudo apt-add-repository universe
sudo apt update
passwd ubuntu
sudo apt install --yes openssh-server screen vim
ip addr show scope global | grep inet
@koaps
koaps / tmux-cheatsheet.markdown
Created August 28, 2019 19:18 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@koaps
koaps / makefile
Last active April 23, 2019 16:39
Local Dev
ALL_ACTIONS := build up down clean
ALL_TARGETS := proxy
DO_A := $(filter $(ALL_ACTIONS),$(MAKECMDGOALS))
DO_T := $(filter $(ALL_TARGETS),$(MAKECMDGOALS))
.DEFAULT_GOAL := all
actions := $(strip $(if $(DO_A), $(DO_A), up))
targets := $(strip $(if $(DO_T), $(DO_T), $(ALL_TARGETS)))
@koaps
koaps / Git.md
Last active December 2, 2018 20:54
Git Stuff

Git notes and commands

Author reset

git filter-branch --env-filter 'if [ "$GIT_AUTHOR_EMAIL" = "koaps" ]; then
     GIT_AUTHOR_EMAIL=koaps@users.noreply.github.com;
     GIT_AUTHOR_NAME="Koaps";
     GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL;
@koaps
koaps / Vagrantfile
Created October 22, 2018 16:06
Vagrant ZFS example
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Specify minimum Vagrant version and Vagrant API version
Vagrant.require_version '>= 1.9.1'
VAGRANTFILE_API_VERSION = '2'
# Require 'yaml' module
require 'yaml'