Skip to content

rogeralmeida/mydotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

These are the dotfiles that I use to configure my machines. As you can see the objective of this repo is to just me to configure my machines when I'm chaning jobs or when I acquire a new personal machine. There are two flavours of scripts so far: mac and ubuntu

General setup

  1. Generate the required ssh key pairs:
	ssh-keygen -t rsa -C "[email protected]"
  1. Config ssh using the ssh-config.sample as a base to make my git remote iteractions less verbose
	cd ~
	git clone github:rogeralmeida/mydotfiles.git ~/mydotfiles

Mac

  1. run mac.sh and fix any possible issue you might find.

Ubuntu

The last time that I used a ubuntu machine was in the pre-covid age. So I have no idea if this still working.

  1. run ubuntu.sh and pray

Useful cli alias

-='cd -'
..='cd ..' #huge time saver
...=../..
....=../../..
.....=../../../..
......=../../../../..
1='cd -'
2='cd -2'
3='cd -3'
4='cd -4'
5='cd -5'
6='cd -6'
7='cd -7'
8='cd -8'
9='cd -9' #I actually cannot remember using any of this shortcuts that much
_='sudo '
a='fasd -a'
afind='ack -il'
archive='web_search archive'
baidu='web_search baidu'
be='bundle exec'
bec='be cucumber'
bi='bundle install'
bing='web_search bing'
cat=bat #Mandatory. I cannot live without bat anymore
d='fasd -d'
dc=docker-compose #huge time saver
dcd='dc down' #once you build up the muscle memory this is a huge time saver
dcu='dc up' #once you build up the muscle memory this is a huge time saver
dcubrr='dcu --build --force-recreate --remove-orphans'
dcud='dcu -d'
ddg='web_search duckduckgo'
diary='nvim -c :VimwikiMakeDiaryNote -c "cd %:p:h"'
dps='docker ps'
dra=$'docker rm c23f1d4b5d93\n7763cb3a5d93\n43dc8646cfd1\n76008b7808be\n90edd24b75ea\nb807237be89d\nbc5456a7c278\nc4a3a9ecd4c3\nfd53267b48eb\n639dcffa790f\ncb5d0be0db81\n5131645955ba\nbdbac395a31f\na66ff105e187\nfd2f569644d7\n85a9227dd54a\n28eb8c3575de\n1bd0c1372bd6\n5dd1d13ea9ed\n880754e9ac24\n0ba09ac2d437\ne524d095fb7d\n0928e4d43353\ned1e1a41b9fe\ncd1da214feb7\n561ac7b6b8fb\n71bdd33c39f7\n3f384dd90970\naf733ebfea6c\n718040645c25\n70bcf176d509\n2b844d53b2b2\nd28205f83d7e\n00612876a3ca\neddf1bef47b1\n1e573d4d614c'
dsa=$'docker stop c23f1d4b5d93\n43dc8646cfd1\n76008b7808be\n90edd24b75ea'
ducky='web_search duckduckgo \!'
ecosia='web_search ecosia'
egrep='egrep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}'
f='fasd -f'
f5='source /Users/rogeralmeida/mydotfiles/.zshrc'
fgrep='fgrep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}'

# GIT SECTION
g=git
ga='git add'
gaa='git add --all'
gam='git am'
gama='git am --abort'
gamc='git am --continue'
gams='git am --skip'
gamscp='git am --show-current-patch'
gap='git add -p' # The right way to add items to the index
gapa='git add --patch'
gapt='git apply --3way'
gau='git add --update'
gav='git add --verbose'
gb='git branch'
gbD='git branch -D'
gba='git branch -a'
gbd='git branch -d'
gbda='git branch --no-color --merged | command grep -vE "^([+*]|\s*($(git_main_branch)|$(git_develop_branch))\s*$)" | command xargs git branch -d 2>/dev/null'
gbl='git blame -b -w'
gbnm='git branch --no-merged'
gbr='git branch --remote'
gbs='git bisect'
gbsb='git bisect bad'
gbsg='git bisect good'
gbsr='git bisect reset'
gbss='git bisect start'
# This is support important. It will list the most touched files in the git history.
gbugaddresses='git log --pretty=format: --name-only | grep -ve '\''^$'\'' | sort | uniq -c | sort -r | less | head -30'
gc='git commit -v'
'gc!'='git commit -v --amend'
gca='git commit -v -a'
'gca!'='git commit -v -a --amend'
gcam='git commit -a -m'
'gcan!'='git commit -v -a --no-edit --amend'
'gcans!'='git commit -v -a -s --no-edit --amend'
gcas='git commit -a -s'
gcasm='git commit -a -s -m'
gcb='git checkout -b'
gcd='git checkout $(git_develop_branch)'
gcf='git config --list'
gcl='git clone --recurse-submodules'
gclean='git clean -id'
gcm='git commit -m' #I used to use it a lot, now I use gmc way more often.
gcmsg='git commit -m'
'gcn!'='git commit -v --no-edit --amend'
gco='git checkout'
gcommiters='git shortlog -s | sort'
gcor='git checkout --recurse-submodules'
gcount='git shortlog -sn'
gcp='git cherry-pick'
gcpa='git cherry-pick --abort'
gcpc='git cherry-pick --continue'
gcs='git commit -S'
gcsm='git commit -s -m'
gcss='git commit -S -s'
gcssm='git commit -S -s -m'
gd='git diff'
gdc='git diff --cached'
gdca='git diff --cached'
gdct='git describe --tags $(git rev-list --tags --max-count=1)'
gdcw='git diff --cached --word-diff'
gds='git diff --staged'
gdt='git diff-tree --no-commit-id --name-only -r'
gdup='git diff @{upstream}'
gdw='git diff --word-diff'
gf='git fetch'
gfa='git fetch --all --prune --jobs=10'
gfg='git ls-files | grep'
gfo='git fetch origin'
gg='git grep'
gga='git gui citool --amend'
ggpull='git pull origin "$(git_current_branch)"'
ggpur=ggu
ggpush='git push origin "$(git_current_branch)"'
ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
ghh='git help'
gig=__git_ignore_file
gignore='git update-index --assume-unchanged'
gignored='git ls-files -v | grep "^[[:lower:]]"'
git-svn-dcommit-push='git svn dcommit && git push github $(git_main_branch):svntrunk'
github='web_search github'
givero='web_search givero'
gk='\gitk --all --branches &!'
gke='\gitk --all $(git log -g --pretty=%h) &!'
gl='git log --graph --pretty=format:'\''%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --abbrev-commit'
glc='git log --name-status | grep -E '\''^M[[:blank:]]'\'' | cut -d'\'' '\'' -f 2  | sort | uniq -c | sort -rn | head -20'
glg='git log --stat'
glgg='git log --graph'
glgga='git log --graph --decorate --all'
glgm='git log --graph --max-count=10'
glgp='git log --stat -p'
gll='gl --stat'
glll='gl -p'
glo='git log --oneline --decorate'
globurl='noglob urlglobber '
glod='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'\'
glods='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'\'' --date=short'
glog='git log --oneline --decorate --graph'
gloga='git log --oneline --decorate --graph --all'
glol='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'\'
glola='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'\'' --all'
glols='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'\'' --stat'
glp=_git_log_prettily
glsu='git ls-files -o --exclude-standard'
glum='git pull upstream $(git_main_branch)'
gm='git merge'
gma='git merge --abort'
gmc='gitmoji -c'
gmom='git merge origin/$(git_main_branch)'
gmtl='git mergetool --no-prompt'
gmtlvim='git mergetool --no-prompt --tool=vimdiff'
gmum='git merge upstream/$(git_main_branch)'
goodreads='web_search goodreads'
google='web_search google'
gp='git push'
gpd='git push --dry-run'
gpf='git push --force-with-lease'
'gpf!'='git push --force'
gph='git push heroku master'
gpo='git push origin'
gpoat='git push origin --all && git push origin --tags'
gpr='git pull --rebase'
gpristine='git reset --hard && git clean -dffx'
gpsup='git push --set-upstream origin $(git_current_branch)'
gpu='git push upstream'
gpv='git push -v'
gr='git remote'
gra='git remote add'
grb='git rebase'
grba='git rebase --abort'
grbc='git rebase --continue'
grbd='git rebase $(git_develop_branch)'
grbi='git rebase -i'
grbm='git rebase $(git_main_branch)'
grbo='git rebase --onto'
grbs='git rebase --skip'
grep='grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}'
grev='git revert'
grh='git reset'
grhh='git reset --hard'
grm='git rm'
grmc='git rm --cached'
grmv='git remote rename'
groh='git reset origin/$(git_current_branch) --hard'
grrm='git remote remove'
grs='git restore'
grset='git remote set-url'
grss='git restore --source'
grst='git restore --staged'
grt='cd "$(git rev-parse --show-toplevel || echo .)"'
gru='git reset --'
grup='git remote update'
grv='git remote -v'
gs='git status -sb'
gsb='git status -sb'
gsd='git svn dcommit'
gsh='git show'
gsi='git submodule init'
gsps='git show --pretty=short --show-signature'
gsr='git svn rebase'
gss='git status -s'
gst='git status'
gsta='git stash push'
gstaa='git stash apply'
gstall='git stash --all'
gstc='git stash clear'
gstd='git stash drop'
gstl='git stash list'
gstp='git stash pop'
gsts='git stash show --text'
gstu='git stash -u'
gsu='git submodule update'
gsw='git switch'
gswc='git switch -c'
gswd='git switch $(git_develop_branch)'
gswm='git switch $(git_main_branch)'
gtl='gtl(){ git tag --sort=-v:refname -n -l "${1}*" }; noglob gtl'
gts='git tag -s'
gtv='git tag | sort -V'
gunignore='git update-index --no-assume-unchanged'
gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'
gup='git pull --rebase'
gupa='git pull --rebase --autostash'
gupav='git pull --rebase --autostash -v'
gupv='git pull --rebase -v'
gwch='git whatchanged -p --abbrev-commit --pretty=medium'
gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign -m "--wip-- [skip ci]"'
history=omz_history
image='web_search duckduckgo \!i'
l='ls -lah'
la='ls -lAh'
ll='ls -lahp'
ls='ls -G'
lsa='ls -lah'
map='web_search duckduckgo \!m'
mci='time mvn -T 4 clean install'
md='mkdir -p'
migrate='rake db:migrate db:rollback && rake db:migrate' #The right way to run rails migrations
mvn=mvn-or-mvnw
'mvn!'='mvn -f $(git rev-parse --show-toplevel 2>/dev/null || echo ".")/pom.xml'
mvn-updates='mvn versions:display-dependency-updates'
mvnag='mvn archetype:generate'
mvnboot='mvn spring-boot:run'
mvnc='mvn clean'
mvncd='mvn clean deploy'
mvnce='mvn clean eclipse:clean eclipse:eclipse'
mvnci='mvn clean install'
mvncie='mvn clean install eclipse:eclipse'
mvncini='mvn clean initialize'
mvncist='mvn clean install -DskipTests'
mvncisto='mvn clean install -DskipTests --offline'
mvncom='mvn compile'
mvncp='mvn clean package'
mvnct='mvn clean test'
mvncv='mvn clean verify'
mvncvst='mvn clean verify -DskipTests'
mvnd='mvn deploy'
mvndocs='mvn dependency:resolve -Dclassifier=javadoc'
mvndt='mvn dependency:tree'
mvne='mvn eclipse:eclipse'
mvnfmt='mvn fmt:format'
mvnjetty='mvn jetty:run'
mvnp='mvn package'
mvnqdev='mvn quarkus:dev'
mvns='mvn site'
mvnsrc='mvn dependency:sources'
mvnt='mvn test'
mvntc='mvn tomcat:run'
mvntc7='mvn tomcat7:run'
news='web_search duckduckgo \!n'
npmD='npm i -D '
npmE='PATH="$(npm bin)":"$PATH"'
npmF='npm i -f'
npmI='npm init'
npmL='npm list'
npmL0='npm ls --depth=0'
npmO='npm outdated'
npmP='npm publish'
npmR='npm run'
npmS='npm i -S '
npmSe='npm search'
npmU='npm update'
npmV='npm -v'
npmg='npm i -g '
npmi='npm info'
npmst='npm start'
npmt='npm test'
please=sudo
qwant='web_search qwant'
rb='rbenv exec bundle exec'
rd=rmdir
rei='rbenv install -l | selecta | xargs rbenv install'
run-help=man
s='fasd -si'
sai='time sudo apt install'
saiy='time sudo apt install -y'
sau='time sudo apt-get update'
scholar='web_search scholar'
sd='fasd -sid'
sf='fasd -sif'
sp='web_search startpage'
stackoverflow='web_search stackoverflow'
sub='open -a"Sublime Text"'
t='todo-txt -d /Users/rogeralmeida/.todo-txt/.todo.cfg'
ta='todo-txt -d /Users/rogeralmeida/.todo-txt/.todo.cfg a'
tad='tmux attach -d -t'
td='todo-txt -d /Users/rogeralmeida/.todo-txt/.todo.cfg do'
tests='time (be rspec && be rake cucumber:non_js && be rake cucumber:js)'
tkss='tmux kill-session -t'
tksv='tmux kill-server'
tl='tmux list-sessions'
tmux=_zsh_tmux_plugin_run
ts='tmux new-session -s'
txa='tmux a -t'
txn='tmux new -s'
v='sf -e vim'
vbr='vagrant box remove'
vd='vagrant destroy'
vdf='vagrant destroy --force'
vh='vagrant halt'
vlc=/Applications/VLC.app/Contents/MacOS/VLC
vr='vagrant reload'
vready='vagrant up && vagrant ssh'
vrp='vagrant reload --provision'
vssh='vagrant ssh'
vst='vagrant status'
vup='time vagrant up'
vw='nvim +VimwikiIndex -c "cd %:p:h"'
which-command=whence
wiki='web_search duckduckgo \!w'
wolframalpha='web_search wolframalpha'
x=extract
yahoo='web_search yahoo'
yandex='web_search yandex'
youtube='web_search duckduckgo \!yt'
z='fasd_cd -d'
zz='fasd_cd -d -i'

License

Release under GPLv3

About

My Dot Files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published