Skip to content

Instantly share code, notes, and snippets.

@willfolsom
willfolsom / stuff.txt
Created December 7, 2023 16:01
linux
df -H
du -a -h --max-depth=1 | sort -hr
rm -rf path/to/*
@willfolsom
willfolsom / gist:6b73bb2f37c389d59c5edfea4b8319c0
Last active November 3, 2023 17:18
Google Sheets - Force content to one line
Edit -> Find and Replace
Search on (exact following): \r\n|\n|\r
Replace with space or nothing
Select match regex
Replace
@willfolsom
willfolsom / five_layer_network_model.png
Last active November 15, 2021 02:07
Five layer networking model example
five_layer_network_model.png
@willfolsom
willfolsom / tput.sh
Created May 27, 2021 20:43
Using tput and variables in .sh script
#!/bin/bash
green=`tput setaf 2`
bold=`tput bold`
reset=`tput sgr0`
separator="-----=====-----=====-----=====-----=====-----"
echo "🧪 ${green}${bold}Running step one"
echo "${separator}${reset}"
echo "hello world"
@willfolsom
willfolsom / myvscodeextensions.md
Last active September 29, 2022 02:24
My VS Code Extensions

Run: code --list-extensions | xargs -L 1 echo

CoenraadS.bracket-pair-colorizer
cssho.vscode-svgviewer
dsznajder.es7-react-js-snippets
eamodio.gitlens
formulahendry.code-runner
fwcd.kotlin
golang.go
@willfolsom
willfolsom / snippets.mysql
Last active December 28, 2020 16:20
MySQL Query Snippets
select GROUP_CONCAT(distinct(country) order by country asc SEPARATOR ';') from diary;
-- IN --
-- id travel_date country
-- 1 2008-05-12 Ireland
-- 2 2010-11-04 France
-- 3 2005-10-02 Australia
-- 4 2008-06-08 Japan
-- 5 2010-08-27 Austria
-- 6 2009-02-05 France
@willfolsom
willfolsom / .zshrc
Last active December 9, 2020 20:03
Add Git Branch Information to .zshrc (then save and run `source .zshrc`)
# Load version control information
autoload -Uz vcs_info
precmd() { vcs_info }
# Format the vcs_info_msg_0_ variable
zstyle ':vcs_info:git:*' formats '%F{green}[%b]%f '
# Set up the prompt (with git branch name)
setopt PROMPT_SUBST
PROMPT='%n ${PWD/#$HOME/~} ${vcs_info_msg_0_}$ '