Skip to content

Instantly share code, notes, and snippets.

View bradleymarques's full-sized avatar

Bradley Marques bradleymarques

View GitHub Profile
@bradleymarques
bradleymarques / .zshrc
Created January 6, 2023 10:12
zshrc git aliases
alias gs="git status"
alias gpush="git push origin"
alias gpull="git pull origin"
alias glog="git log"
alias gaa="git add --all"
alias gcm="git commit -m"
alias gfap="git fetch --all --prune"
alias gclean="git branch --merged >/tmp/merged-branches && \
vi /tmp/merged-branches && xargs git branch -d </tmp/merged-branches"
@bradleymarques
bradleymarques / setup_ruby_project.sh
Last active May 10, 2016 08:03
Bash script to initialise skeleton Ruby (not Rails) project. Pass in the name of the project and it will create the file structure and some initial files, as per this tutorial: http://learnrubythehardway.org/book/ex46.html. Also initialises the folder as a git repository and does an initial commit. Finally, the script runs a smoke test to ensure…
#!/bin/bash
name=$1
if [[ -z $name ]]; then
echo "Please specify a name for the Ruby project"
exit
fi
# Setup directory structure
mkdir $name