Skip to content

Instantly share code, notes, and snippets.

@bossjones
Last active June 5, 2025 00:44
Show Gist options
  • Save bossjones/3019300149614e94dc6eef59c9f423d0 to your computer and use it in GitHub Desktop.
Save bossjones/3019300149614e94dc6eef59c9f423d0 to your computer and use it in GitHub Desktop.
post_devin.sh
# change password first before homebrew commands run.
sudo passwd ubuntu
# setup everything for neovim
mkdir -p ~/.local/src || true
mkdir -p ~/.local/bin || true
mkdir -p ~/.local/share || true
# SOURCE: https://rtx.pub/install.sh
#region environment setup
get_os() {
os="$(uname -s)"
if [ "$os" = Darwin ]; then
echo "macos"
elif [ "$os" = Linux ]; then
echo "linux"
else
error "unsupported OS: $os"
fi
}
# SOURCE: https://rtx.pub/install.sh
get_arch() {
arch="$(uname -m)"
if [ "$arch" = x86_64 ]; then
echo "x64"
elif [ "$arch" = aarch64 ] || [ "$arch" = arm64 ]; then
echo "arm64"
else
error "unsupported architecture: $arch"
fi
}
CURRENT_OS="$(get_os)"
# shellcheck disable=SC2034 # Unused variables left for readability
CURRENT_ARCH="$(get_arch)"
get_system() {
os="$(get_os)"
arch="$(get_arch)"
}
display_tarball_platform_dash() {
# https://en.wikipedia.org/wiki/Uname
local os="unexpected_os"
local uname_a="$(uname -a)"
case "${uname_a}" in
Linux*) os="linux" ;;
Darwin*) os="darwin" ;;
SunOS*) os="sunos" ;;
AIX*) os="aix" ;;
CYGWIN*) echo_red >&2 "Cygwin is not supported by n" ;;
MINGW*) echo_red >&2 "Git BASH (MSYS) is not supported by n" ;;
esac
local arch="unexpected_arch"
local uname_m="$(uname -m)"
case "${uname_m}" in
x86_64) arch=x64 ;;
i386 | i686) arch="x86" ;;
aarch64) arch=arm64 ;;
armv8l) arch=arm64 ;; # armv8l probably supports arm64, and there is no specific armv8l build so give it a go
*)
# e.g. armv6l, armv7l, arm64
arch="${uname_m}"
;;
esac
# Override from command line, or version specific adjustment.
[ -n "$ARCH" ] && arch="$ARCH"
echo "${os}-${arch}"
}
display_tarball_platform_underscore() {
# https://en.wikipedia.org/wiki/Uname
local os="unexpected_os"
local uname_a="$(uname -a)"
case "${uname_a}" in
Linux*) os="linux" ;;
Darwin*) os="darwin" ;;
SunOS*) os="sunos" ;;
AIX*) os="aix" ;;
CYGWIN*) echo_red >&2 "Cygwin is not supported by n" ;;
MINGW*) echo_red >&2 "Git BASH (MSYS) is not supported by n" ;;
esac
local arch="unexpected_arch"
local uname_m="$(uname -m)"
case "${uname_m}" in
x86_64) arch=x64 ;;
i386 | i686) arch="x86" ;;
aarch64) arch=arm64 ;;
armv8l) arch=arm64 ;; # armv8l probably supports arm64, and there is no specific armv8l build so give it a go
*)
# e.g. armv6l, armv7l, arm64
arch="${uname_m}"
;;
esac
# Override from command line, or version specific adjustment.
[ -n "$ARCH" ] && arch="$ARCH"
echo "${os}_${arch}"
}
os_name=$(cat /etc/os-release | grep -oP '^NAME="\K[^"]+')
echo "The operating system is Ubuntu."
sudo apt install luarocks neofetch -y
sudo luarocks install luacheck
curl -L "https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-$(display_tarball_platform_dash)" >~/.local/bin/hadolint && \
chmod +x ~/.local/bin/hadolint && \
pip install vim-vint && \
npm install -g @fsouza/prettierd && \
pip install yapf flake8 black && \
cd ~/.local/src && \
wget "https://github.com/errata-ai/vale/releases/download/v2.26.0/vale_2.26.0_$(display_tarball_platform_underscore).tar.gz" -O vale.tar.gz && \
tar -xvzf vale.tar.gz -C ~/.local/bin && \
rm vale.tar.gz && \
npm install -g markdownlint-cli
cd ~/.local/src
mkdir -p ~/.local/share/fonts || true
cd ~/.local/share/fonts
curl -fLO https://github.com/ryanoasis/nerd-fonts/raw/refs/heads/master/patched-fonts/FiraCode/Regular/FiraCodeNerdFont-Regular.ttf
cd ~/.local/src
sudo git clone https://github.com/bossjones/debug-tools /usr/local/src/debug-tools || true
sudo chown ubuntu:ubuntu -R /usr/local/src/debug-tools
cd /usr/local/src/debug-tools
./update-bossjones-debug-tools
install-tmux.sh
cd -
mkdir ~/.tmuxinator || true 2>/dev/null
cat <<"EOF" >~/.tmuxinator/zsh.yml
# ~/.tmuxinator/zsh.yml
name: zsh
root: ~/
# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions.
# pre_window: exec zsh -l
windows:
- neofetch:
layout: 9fa4,223x75,0,0{118x75,0,0[118x52,0,0{59x52,0,0,8,58x52,60,0,13},118x22,0,53,12],104x75,119,0[104x16,119,0,1,104x15,119,17,9,104x22,119,33,2,104x19,119,56,3]}
panes:
- neofetch:
- neofetch
EOF
fi
pip install pyvideothumbnailer || true
curl -LsSf https://astral.sh/uv/install.sh | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment