Skip to content

Instantly share code, notes, and snippets.

# Shell aliases specific for Macs
# Upgrade all brew applications while deferring the automatic cache cleanup until after all upgrades are complete
alias brew-upgrade='export HOMEBREW_NO_INSTALL_CLEANUP=1 ; brew update && brew upgrade && brew upgrade --cask ; brew cleanup' ;
@DallasO
DallasO / commit-cleanup.sh
Last active March 24, 2021 14:28
For when you realize your personal email is made public to GitHub
#!/bin/sh
##
# Best to run these commands separately
##
##
@DallasO
DallasO / add_to_anacron.md
Last active January 15, 2020 17:55
Steps to add a user level anacron

Installing Anacron for User scripts

Make sure anacron is installed

Example: # apt install anacron

Set up script to be ran by anacron

  1. Make sure your new script is executable
@DallasO
DallasO / .otw_bash_funcs
Last active September 8, 2019 18:48
Bash function to quickly connect to overthewire.org
# Add this function to your ~/.bash_alises
# Or ~/.bash_secrets if you've looked at my other Gists ;)
# overthewire.org
# otw game level [port]
# otw bandit 0
otw () {
if [ $# == 0 ]; then
echo "SSH to an OverTheWire wargame" ;
@DallasO
DallasO / git-alias.sh
Last active January 15, 2020 18:55
My git aliases
# git graph
git config --global alias.graph 'log --all --decorate --oneline --graph'
@DallasO
DallasO / commit_format.txt
Created April 18, 2019 15:07 — forked from mutewinter/commit_format.txt
My commit message format.
feat: add hat wobble
^--^ ^------------^
| |
| +-> Summary in present tense.
|
+-------> Type: chore, docs, feat, fix, refactor, style, or test.
# 1. redo last command but as root
sudo !!
# 2. open an editor to run a command
ctrl+x+e
# 3. create a super fast ram disk
mkdir -p /mnt/ram
mount -t tmpfs tmpfs /mnt/ram -o size=8192M
@DallasO
DallasO / .tmux.conf
Last active January 27, 2020 18:09
Config for tmux. Save as ~/.tmux.conf
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# Fix broken colored prompt - This doesn't work with MacOs?
set -g default-terminal "tmux-256color"
# Open a bottom pane to edit .tmux.conf
bind-key M split-window -v "nano ~/.tmux.conf"
# Reload .tmux.conf
@DallasO
DallasO / .bash_aliases
Last active April 14, 2023 23:38
My Bash aliases
## BASIC
alias x='exit'
alias c='clear'
alias ll='ls -lh' # List files/dirs, `-l` with more details, `-h` show filesize in human-readable format
alias grep='grep --color=auto' # COLORSS!
## Routine
alias update='sudo apt update && apt list --upgradeable' # Check for updates
alias upgrade='sudo apt upgrade --auto-remove' # Install those updates
alias autoremove='sudo apt autoremove && sudo apt autoclean' # Run every few months to clear apt cache
alias aptinstall='sudo apt install' # Install something from apt