Skip to content

Instantly share code, notes, and snippets.

@jwpleow
jwpleow / .zshrc
Last active July 30, 2023 14:23
zshrc
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
@jwpleow
jwpleow / zsh.bash
Last active July 30, 2023 14:23
zsh setup
# Install zsh from apt
sudo apt install zsh
# Install OMZ plugin manager
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# https://github.com/athityakumar/colorls
# Zsh-z autojump
git clone https://github.com/agkozak/zsh-z $ZSH_CUSTOM/plugins/zsh-z
@jwpleow
jwpleow / .tmux.conf
Last active October 11, 2024 06:46
Setting up tmux
# INSTALLATION
# sudo apt install tmux xsel && git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# Install plugins with Ctrl+b + I (capitalised!!)
# select text via mouse by holding shift first - if having issues with selection going to another pane, use prefix + z to zoom/unzoom on the current panel
# Prefix default = Ctrl + b (C-b)
# Copy Pasting using copy mode:
# enter copy mode - C-b [, start copying with C-space, and press y to copy with tmux-yank
@vaughnd
vaughnd / gist:3759951
Created September 21, 2012 06:02
Bash script to run more than one process in parallel and kill all when exiting the script (via ctrl-c or kill)
#!/bin/bash
# kill all subshells and processes on exit
trap "kill 0" SIGINT
# start commands in subshells so all their spawn DIE when we exit
( process1 ) &
( process2 ) &
wait