Skip to content

Instantly share code, notes, and snippets.

@OzTamir
Last active August 21, 2016 11:25
Show Gist options
  • Save OzTamir/afc39f9b8cdbdd5e7a57c8d7eb7285e0 to your computer and use it in GitHub Desktop.
Save OzTamir/afc39f9b8cdbdd5e7a57c8d7eb7285e0 to your computer and use it in GitHub Desktop.
Bash-it confguration
#!/usr/bin/env bash
# Go home!
alias home="cd ~"
# Edit custom aliases
alias bashconf="sublime ~/.bash_it/aliases/custom.aliases.bash"
# Edit .bash_profile
alias bashitconf="sublime ~/.bash_profile"
# Find IP addresses from ifconfig!
alias iplist="ifconfig | grep inet | grep -E -o '([0-9]{1,3}[\.]){3}[0-9]{1,3}'"
# Download updates to this file!
alias updateconf="cd ~/.bash_it/aliases && git pull origin master"
# Upload updates to this file
alias commitconf="cd ~/.bash_it/aliases && git add custom.aliases.bash -f && git commit -m 'Updated config' && git push origin master"
# Copy the current path to clipboard
alias path="pwd | pbcopy"
# Find a file by name
alias ffind="find . -name"
# Play 2048
alias 2048="source /Users/OzTamir/.bash_it/custom/bash2048.sh"
# Number of lines changed by me
function git_my_work() {
git log --author="Oz Tamir" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -
}
# WORK ALIASES
# Run the Boqs
alias boqs="NODE_ENV=development node server.js -f -n development-appServer -- --conductor:disable"
# Fix the stupid config file
alias confix="source /Users/Assembrix/Desktop/boqs/confix.sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment