Skip to content

Instantly share code, notes, and snippets.

View rslay's full-sized avatar

rslay

View GitHub Profile
@rslay
rslay / Auto-config vim and tmux
Last active October 28, 2025 20:10
Set up Vim with One Dark Pro colors, whitespace rendering, configure tmux to use better colors, and enable viewing tmux scrollback via mousewheel
mkdir -p ~/.vim/autoload ~/.vim/colors &&
curl -fsSL https://raw.githubusercontent.com/joshdick/onedark.vim/refs/heads/main/autoload/onedark.vim -o ~/.vim/autoload/onedark.vim &&
curl -fsSL https://raw.githubusercontent.com/joshdick/onedark.vim/refs/heads/main/colors/onedark.vim -o ~/.vim/colors/onedark.vim &&
(touch ~/.vimrc; grep -qxF 'colorscheme onedark' ~/.vimrc || echo 'colorscheme onedark' >> ~/.vimrc) &&
echo "syntax on" >> ~/.vimrc &&
echo "set tabstop=4 shiftwidth=4 autoindent cursorline softtabstop=-1" >> ~/.vimrc &&
echo "set list listchars=tab:⟶\ ,trail:·,extends:>,precedes:<,nbsp:% lcs+=space:· listchars-=eol:$" >> ~/.vimrc &&
# Enable true color support in terminal Vim and Neovim
if (has("nvim"))
@rslay
rslay / set_date_with_timezone.sh
Created April 17, 2021 02:47
Script to set datetime localtime $TZ Variable
# Adjust the number 2 to suit your needs, or use a different timezone like PDT
export TZ=EST2EDT
# Get the current time from an internet site (clearly, not a reliable method) and store into file
wget "https://www.utctime.net/" -O curtime.txt && grep "td>UTC</td" curtime.txt|head -n 1|cut -f 4 -d '>'|cut -f 1 -d '<'|sed -e 's/T/ /g'|
# Remove the Z character (for me, on a weird Unix distro, this causes the date command issues)
sed -e 's/Z//g' > curtime_fmt.txt &&
# Take a few seconds, just in case, because some versions of wget theoretically(?) might not be blocking
@rslay
rslay / tasks.json
Last active December 7, 2019 20:58
vscode tasks.json - real-world example w/ multiple commands
{
"version": "2.0.0",
"tasks": [
{
"label": "Build for Windows x64",
"type": "shell",
// Place the labels of commands in this array, in order. More can be added.
"dependsOn":["UpdateFiles", "WarpExe"],
"command": "echo",
"args": [