forked from mladenoff/cats_are_awesome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aliases
101 lines (87 loc) · 3.17 KB
/
aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Usage: gca 'your_full_name' 'your_email' And, make sure to thank David Dobrynin
function gca {
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='$1'; GIT_AUTHOR_EMAIL='$2'; GIT_COMMITTER_NAME='$1'; GIT_COMMITTER_EMAIL='$2';"
}
alias sl="ls"
alias ls="ls -a"
alias irb="pry"
# Terminal navigation shortcuts and tips
alias root="cd ~"
# to go to previous directory
#cd -
alias back="cd -"
alias oops="cd -"
# to refer to previous directory, use ~- example:
alias lsback="ls ~-"
alias desk="cd ~/Desktop"
alias desktop="cd ~/Desktop"
# Bundle and RSPEC shortcuts
alias be="bundle exec"
alias ber="bundle exec rspec"
alias bem="bundle exec rake db:migrate db:test:load"
alias bea="bundle exec annotate"
# You can run just the specs in a single spec file by running bundle exec rspec
# file_name.rb in terminal e.g., bundle exec rspec hello_spec.rb.
# You can run just one spec or set of specs by running bundle exec rspec
# file_name.rb:(line_number) in terminal e.g., bundle exec rspec hello_spec.rb:3.
# App Academy Specific shortcuts
alias aa="atom . ;bundle install;bundle exec rspec ;bundle exec annotate"
alias setup="./setup_db.sh ; ./import_db.sh; bundle exec annotate"
#alias YOURNICKNAME="zip -r ~/Desktop/firstname_lastname.zip ~/Desktop/firstname_lastname; mv ~/Desktop/firstname_lastname.zip ~/Desktop/YOUR_ACTUAL_NAME"
alias rdbm="bundle exec rake db:migrate db:test:load"
#alias homework="cd ~/YOUR_HOMEWORK_FOLDER_AND_THEN_COMMENT_THIS_IN"
#alias hw="cd ~/SAME"
#alias aaruby="cd ~/YOUR_PROJECTS_FOLDER_AND_THEN_COMMENT_THIS_IN"
#alias aar="cd ~/SAME"
# rails shortcuts
alias rdc="rake db:create"
alias rdm="rake db:migrate"
alias rgmig="rails g migration"
alias rr="rake routes"
alias rgmod="rails g model"
alias rc="rails c"
alias rs="rails s"
alias rdbrb="rails db:rollback"
alias rdrb="rails db:rollback"
alias rg="rails generate"
alias rn="rails new"
alias rgc="rails generate controller"
alias rgs="rails generate scaffold"
# model is generated by controller, so you don't need a shortcut for it
alias rgm="rails generate migration"
alias rdbs="rake db:seed"
alias rds="rake db:seed"
# git shortcuts
alias gl="git log"
alias gi="git init"
alias gaa="git add -A"
alias gcm="git commit -m"
alias gcam="git add -A; git commit -m"
# this is the step where you would use gca to rewrite heads
alias gp="git push"
alias gpom="git push origin master"
alias gc="git checkout"
alias gcb="git checkout -b"
alias gm="git merge"
# if using app academy dot files, allows for tab completion.
__git_complete gp _git_push
__git_complete gc _git_checkout
__git_complete gm _git_merge
__git_complete gp _git_push
# Zipping files
# zip -r zipped_name.zip directory
# ie if my folder is named john_smith
# I would run 'zip -r john_smith.zip john_smith'
# to create the zip file
#
# the '-r' flag means 'recursively' and will zip all of the files in the directory
# unzipping files: unzip zipped_file
# ie run 'uz assesment01.zip'
alias uz="unzip"
alias z="zip -r"
# Renaming files
#mv original_name new_name
# ie 'mv PooRlyFormatedFiLeNAme nicely_formatted_file_name'
# ^ renames PooRlyFormatedFiLeNAme to nicely_formatted_file_name
# mv stands for move.
# For my eternal respect, dare to push your own changes into this repo