Skip to content

Instantly share code, notes, and snippets.

tail -f <file> | grep -A <integer> --line-buffered "<search term>"
# Force all html.erb files into the Rails language
"*":
core:
customFileTypes: {
"text.html.ruby": ['html.erb']
}
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
alias lso='stat -c "%a %n"'
alias lsown='stat -c "%U:%G %n"'
@tofirius
tofirius / mysql-dump-tables-by-prefix.txt
Last active January 16, 2023 19:56
MySQL dump of tables that begin with a given prefix
mysql database_name -u username -pPassWord -N -e 'show tables like "tableprefix\_%"' | xargs mysqldump database_name -u username -pPassWord > prefixedtable_dump.sql