Merge branch 'master' of gitlab.com:tyrelsouza/dotfiles
This commit is contained in:
commit
4842a33192
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ vim/view
|
|||||||
.netrwhist
|
.netrwhist
|
||||||
chromedriver
|
chromedriver
|
||||||
config/fish/fishd.*
|
config/fish/fishd.*
|
||||||
|
emacs.d/elpa
|
||||||
|
@ -18,6 +18,7 @@ rm -rf ~/.gitignore
|
|||||||
rm -rf ~/.git_template
|
rm -rf ~/.git_template
|
||||||
rm -rf ~/.hushlogin
|
rm -rf ~/.hushlogin
|
||||||
rm -rf ~/.vim
|
rm -rf ~/.vim
|
||||||
|
rm -rf ~/.emacs
|
||||||
rm -rf ~/.vimrc
|
rm -rf ~/.vimrc
|
||||||
rm -rf ~/.zshrc
|
rm -rf ~/.zshrc
|
||||||
rm -rf ~/.pythonstartup.py
|
rm -rf ~/.pythonstartup.py
|
||||||
@ -34,6 +35,7 @@ ln -s $(pwd)/gitconfig ~/.gitconfig
|
|||||||
ln -s $(pwd)/gitignore ~/.gitignore
|
ln -s $(pwd)/gitignore ~/.gitignore
|
||||||
ln -s $(pwd)/git_template ~/.git_template
|
ln -s $(pwd)/git_template ~/.git_template
|
||||||
ln -s $(pwd)/hushlogin ~/.hushlogin
|
ln -s $(pwd)/hushlogin ~/.hushlogin
|
||||||
|
ln -s $(pwd)/emacs ~/.emacs
|
||||||
ln -s $(pwd)/vim ~/.vim
|
ln -s $(pwd)/vim ~/.vim
|
||||||
ln -s $(pwd)/vimrc ~/.vimrc
|
ln -s $(pwd)/vimrc ~/.vimrc
|
||||||
ln -s $(pwd)/zshrc ~/.zshrc
|
ln -s $(pwd)/zshrc ~/.zshrc
|
||||||
@ -57,8 +59,8 @@ ln -s $(pwd)/config/fish ~/.config/fish
|
|||||||
mkdir -p ~/.vim/bundle
|
mkdir -p ~/.vim/bundle
|
||||||
cd ~/.vim/bundle
|
cd ~/.vim/bundle
|
||||||
# Put Bundles Here
|
# Put Bundles Here
|
||||||
|
git clone git@github.com:JamshedVesuna/vim-markdown-preview.git
|
||||||
git clone git@github.com:Shougo/denite.nvim.git
|
git clone git@github.com:Shougo/denite.nvim.git
|
||||||
git clone git@github.com:spolu/dwm.vim.git
|
|
||||||
git clone git@github.com:croaky/vim-colors-github.git
|
git clone git@github.com:croaky/vim-colors-github.git
|
||||||
git clone git@github.com:danro/rename.vim.git
|
git clone git@github.com:danro/rename.vim.git
|
||||||
git clone git@github.com:fatih/vim-go.git
|
git clone git@github.com:fatih/vim-go.git
|
||||||
@ -66,5 +68,7 @@ git clone git@github.com:kien/ctrlp.vim.git
|
|||||||
git clone git@github.com:mileszs/ack.vim.git
|
git clone git@github.com:mileszs/ack.vim.git
|
||||||
git clone git@github.com:pbrisbin/vim-mkdir.git
|
git clone git@github.com:pbrisbin/vim-mkdir.git
|
||||||
git clone git@github.com:scrooloose/syntastic.git
|
git clone git@github.com:scrooloose/syntastic.git
|
||||||
|
git clone git@github.com:spolu/dwm.vim.git
|
||||||
|
git clone git@github.com:tpope/vim-surround.git
|
||||||
git clone git@github.com:vim-airline/vim-airline-themes.git
|
git clone git@github.com:vim-airline/vim-airline-themes.git
|
||||||
git clone git@github.com:vim-airline/vim-airline.git
|
git clone git@github.com:vim-airline/vim-airline.git
|
||||||
|
34
bash_aliases
34
bash_aliases
@ -1,21 +1,25 @@
|
|||||||
#!/usr/local/bin/zsh
|
#!/usr/local/bin/zsh
|
||||||
export HOMEBREW_GITHUB_API_TOKEN="caf4cd85c6eb6ddcf006d4571d4a294c0b0592e4"
|
|
||||||
alias ag='\ag --pager="less"'
|
|
||||||
alias cg='cd "$(git rev-parse --show-toplevel)"'
|
|
||||||
alias fuck='eval $(thefuck $(fc -ln -1)); \history -r'
|
|
||||||
alias g='git'
|
|
||||||
alias pdb="python -m pdb"
|
|
||||||
alias ppjson="python -m json.tool"
|
|
||||||
|
|
||||||
# Addgene specific
|
# Aliases
|
||||||
|
alias adg="workon addgene-core"
|
||||||
alias adocs='cd $ADDGENE_CORE_REPO_DIR/docs && make html && open $ADDGENE_CORE_REPO_DIR/docs/build/html/index.html'
|
alias adocs='cd $ADDGENE_CORE_REPO_DIR/docs && make html && open $ADDGENE_CORE_REPO_DIR/docs/build/html/index.html'
|
||||||
alias aenv='env | sort | grep ADDGENE'
|
alias aenv='env | sort | grep ADDGENE'
|
||||||
alias sl="source local.env.$(basename $SHELL)"
|
alias ag='\ag --pager="less"'
|
||||||
|
alias cg='cd "$(git rev-parse --show-toplevel)"'
|
||||||
|
alias dots="cd $(dirname `readlink ~/.vim`)"
|
||||||
|
alias g='git'
|
||||||
|
alias gp='git push'
|
||||||
|
alias pdb="python -m pdb"
|
||||||
|
alias ppjson="python -m json.tool"
|
||||||
|
alias shrug="echo -n '¯\_(ツ)_/¯' | pbcopy"
|
||||||
|
alias sl="source local.env"
|
||||||
|
alias stabbats='sudo killall VDCAssistant && open https://appear.in/stab-bats'
|
||||||
|
|
||||||
if [[ $OSTYPE == darwin* ]]; then
|
if [[ $OSTYPE == darwin* ]]; then
|
||||||
alias rm=trash;
|
alias rm=trash;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
# Functions
|
||||||
function adtest () {
|
function adtest () {
|
||||||
no_slashes="$(echo "$1" | sed -e 's/\//\./g')";
|
no_slashes="$(echo "$1" | sed -e 's/\//\./g')";
|
||||||
a_test="$(echo "$no_slashes" | sed -e 's/.py//g')";
|
a_test="$(echo "$no_slashes" | sed -e 's/.py//g')";
|
||||||
@ -24,14 +28,6 @@ function adtest () {
|
|||||||
echo "Evaling $run_test";
|
echo "Evaling $run_test";
|
||||||
eval $run_test;
|
eval $run_test;
|
||||||
}
|
}
|
||||||
|
|
||||||
function dots(){
|
|
||||||
cd $(dirname `readlink ~/.vim`)
|
|
||||||
}
|
|
||||||
|
|
||||||
function adg () {
|
|
||||||
workon addgene-core
|
|
||||||
}
|
|
||||||
function cpbr () {
|
function cpbr () {
|
||||||
if branch=$(git symbolic-ref --short -q HEAD)
|
if branch=$(git symbolic-ref --short -q HEAD)
|
||||||
then
|
then
|
||||||
@ -42,9 +38,6 @@ function cpbr () {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
function hidden() { ls -a "$@" | grep '^\.'; }
|
function hidden() { ls -a "$@" | grep '^\.'; }
|
||||||
|
|
||||||
alias shrug="echo -n '¯\_(ツ)_/¯' | pbcopy"
|
|
||||||
|
|
||||||
function h () {
|
function h () {
|
||||||
if [ -z "$*" ]
|
if [ -z "$*" ]
|
||||||
then
|
then
|
||||||
@ -54,4 +47,3 @@ function h () {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
alias stabbats='sudo killall VDCAssistant && open https://appear.in/stab-bats'
|
|
||||||
|
1450
bin/Markdown.pl
Executable file
1450
bin/Markdown.pl
Executable file
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -v
|
set -v
|
||||||
|
|
||||||
if [[ $OSTYPE == "darwin*" ]];then
|
|
||||||
umount /Volumes/ramdisk
|
umount /Volumes/ramdisk
|
||||||
mysql.server stop
|
mysql.server stop
|
||||||
killall mysqld
|
killall mysqld
|
||||||
@ -13,19 +12,3 @@ if [[ $OSTYPE == "darwin*" ]];then
|
|||||||
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://2048000`
|
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://2048000`
|
||||||
cp -r /usr/local/var/mysql /Volumes/ramdisk
|
cp -r /usr/local/var/mysql /Volumes/ramdisk
|
||||||
mysql.server start
|
mysql.server start
|
||||||
else
|
|
||||||
sudo service mysql stop
|
|
||||||
|
|
||||||
# This works on Ubuntu 14.04, but not 16.04:
|
|
||||||
# sudo mkdir -p /mnt/mysql-data-orig
|
|
||||||
# sudo mount --bind /var/lib/mysql /mnt/mysql-data-orig
|
|
||||||
# sudo mount -t tmpfs -o size=32G,uid=mysql,gid=mysql,mode=700 tmpfs /var/lib/mysql
|
|
||||||
# sudo sh -c 'cp -avi /mnt/mysql-data-orig/* /var/lib/mysql/'
|
|
||||||
|
|
||||||
# This works on 16.04 and maybe elsewhere too
|
|
||||||
sudo mkdir -p /mnt/mysql-ram
|
|
||||||
sudo mount -t tmpfs -o size=8G,uid=mysql,gid=mysql,mode=700 tmpfs /mnt/mysql-ram
|
|
||||||
sudo mount -t aufs -o br:/mnt/mysql-ram:/var/lib/mysql=ro aufs /var/lib/mysql
|
|
||||||
|
|
||||||
sudo service mysql start
|
|
||||||
fi
|
|
||||||
|
5
bin/release_package.sh
Executable file
5
bin/release_package.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
python setup.py clean
|
||||||
|
python setup.py sdist bdist_wheel
|
||||||
|
gpg --detach-sign -a dist/*.gz
|
||||||
|
gpg --detach-sign -a dist/*.whl
|
||||||
|
twine upload dist/*
|
53
emacs
Normal file
53
emacs
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
(require 'package)
|
||||||
|
|
||||||
|
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
|
||||||
|
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
|
||||||
|
(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/"))
|
||||||
|
|
||||||
|
(setq package-enable-at-startup nil)
|
||||||
|
(setq sml/theme 'dark)
|
||||||
|
(package-initialize)
|
||||||
|
(custom-set-variables
|
||||||
|
;; custom-set-variables was added by Custom.
|
||||||
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
;; Your init file should contain only one such instance.
|
||||||
|
;; If there is more than one, they won't work right.
|
||||||
|
'(custom-safe-themes
|
||||||
|
(quote
|
||||||
|
("3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" "c74e83f8aa4c78a121b52146eadb792c9facc5b1f02c917e3dbb454fca931223" "a27c00821ccfd5a78b01e4f35dc056706dd9ede09a8b90c6955ae6a390eb1c1e" default)))
|
||||||
|
'(package-selected-packages
|
||||||
|
(quote
|
||||||
|
(neotree smart-mode-line powerline magit use-package helm evil-visual-mark-mode))))
|
||||||
|
(custom-set-faces
|
||||||
|
;; custom-set-faces was added by Custom.
|
||||||
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
;; Your init file should contain only one such instance.
|
||||||
|
;; If there is more than one, they won't work right.
|
||||||
|
)
|
||||||
|
(use-package evil
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(evil-mode 1)
|
||||||
|
;; More configuration goes here
|
||||||
|
)
|
||||||
|
(use-package magit)
|
||||||
|
|
||||||
|
(use-package smart-mode-line
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(sml/setup)
|
||||||
|
)
|
||||||
|
(use-package powerline
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(powerline-center-evil-theme)
|
||||||
|
)
|
||||||
|
; https://www.emacswiki.org/emacs/NeoTree
|
||||||
|
(use-package neotree
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(global-set-key [f8] 'neotree-toggle)
|
||||||
|
)
|
||||||
|
;; Set Powerline Configuration
|
||||||
|
(setq powerline-arrow-shape 'curve)
|
||||||
|
(setq powerline-default-separator-dir '(right . left))
|
41
gitconfig
41
gitconfig
@ -16,32 +16,21 @@
|
|||||||
[format]
|
[format]
|
||||||
pretty = format:%C(auto)%h %C(green)%G? %C(red)%<(15,trunc)%aN %C(cyan)%<(15,trunc)%ar %C(white)%<(60,trunc)%s %C(auto)%d
|
pretty = format:%C(auto)%h %C(green)%G? %C(red)%<(15,trunc)%aN %C(cyan)%<(15,trunc)%ar %C(white)%<(60,trunc)%s %C(auto)%d
|
||||||
[alias]
|
[alias]
|
||||||
# show all these aliases
|
alias = "!git config -l | grep alias | cut -c 7-" # show all these aliases
|
||||||
alias = "!git config -l | grep alias | cut -c 7-"
|
bc = !git branch --merged master | grep -v master | xargs git branch -d # delete all merged branches
|
||||||
# delete all merged branches
|
d = diff --color-words # prettier diffs
|
||||||
bc = !git branch --merged master | grep -v master | xargs git branch -d
|
dsf = "!f() { [ \"$GIT_PREFIX\" != \"\" ] && cd "$GIT_PREFIX"; git diff --color $@ | diff-so-fancy | less --tabs=4 -RFX; }; f" # Diff so fancy!
|
||||||
# Way more information on git log
|
files = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat # Show files modified per commit
|
||||||
ll = log --stat --abbrev-commit
|
ll = log --stat --abbrev-commit # Way more information on git log
|
||||||
# Show files modified per commit
|
lb = log --stat --no-merges origin/master..
|
||||||
files = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
|
logtree= "log --graph --oneline --decorate --all" # show a tree with branches merging
|
||||||
# show a tree with branches merging
|
|
||||||
logtree= "log --graph --oneline --decorate --all"
|
|
||||||
# get the most 10 recent branches worked on
|
|
||||||
recent = "!git for-each-ref --format=\"%(committerdate:relative) | %(refname)\" --sort=-committerdate refs/heads | sed '/master/d' | head -n 15"
|
|
||||||
# show tabs with ⌑ replacing tabs
|
|
||||||
tabs = "!git diff --color | sed 's/\t/⌑/g'"
|
|
||||||
# show the current version tag
|
|
||||||
v=describe --tags --match 'v*'
|
|
||||||
# alias like `hg st`, because I like st, shorter is nice!
|
|
||||||
st = status
|
|
||||||
# prettier diffs
|
|
||||||
d = diff --color-words
|
|
||||||
#push
|
|
||||||
p = push
|
p = push
|
||||||
pr = !"pr() { git fetch origin pull/$1/head:pr-$1; git checkout pr-$1; }; pr"
|
pr = !"pr() { git fetch origin pull/$1/head:pr-$1; git checkout pr-$1; }; pr"
|
||||||
# Diff so fancy!
|
recent = "!git for-each-ref --format=\"%(committerdate:relative) | %(refname)\" --sort=-committerdate refs/heads | sed '/master/d' | head -n 15" # get the most 10 recent branches worked on
|
||||||
dsf = "!f() { [ \"$GIT_PREFIX\" != \"\" ] && cd "$GIT_PREFIX"; git diff --color $@ | diff-so-fancy | less --tabs=4 -RFX; }; f"
|
|
||||||
scrum = log --since='1 day ago' --author='Tyrel Souza' --oneline
|
scrum = log --since='1 day ago' --author='Tyrel Souza' --oneline
|
||||||
|
st = status # alias like `hg st`, because I like st, shorter is nice!
|
||||||
|
tabs = "!git diff --color | sed 's/\t/⌑/g'" # show tabs with ⌑ replacing tabs
|
||||||
|
v=describe --tags --match 'v*' # show the current version tag
|
||||||
[filter "lfs"]
|
[filter "lfs"]
|
||||||
clean = git-lfs clean %f
|
clean = git-lfs clean %f
|
||||||
smudge = git-lfs smudge %f
|
smudge = git-lfs smudge %f
|
||||||
@ -53,3 +42,9 @@
|
|||||||
newHighlight = green bold 22
|
newHighlight = green bold 22
|
||||||
[init]
|
[init]
|
||||||
templatedir = ~/.git_template
|
templatedir = ~/.git_template
|
||||||
|
[difftool "sourcetree"]
|
||||||
|
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
|
||||||
|
path =
|
||||||
|
[mergetool "sourcetree"]
|
||||||
|
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
|
||||||
|
trustExitCode = true
|
||||||
|
12
vimrc
12
vimrc
@ -38,7 +38,7 @@ set paste
|
|||||||
|
|
||||||
" Open new split panes to right and bottom, which feels more natural
|
" Open new split panes to right and bottom, which feels more natural
|
||||||
set splitbelow
|
set splitbelow
|
||||||
" set splitright
|
set splitright
|
||||||
|
|
||||||
" Quicker window movement
|
" Quicker window movement
|
||||||
" Switch between the last two files
|
" Switch between the last two files
|
||||||
@ -133,9 +133,13 @@ nmap <silent> <F1> :set invnumber<CR>
|
|||||||
autocmd StdinReadPre * let s:std_in=1
|
autocmd StdinReadPre * let s:std_in=1
|
||||||
hi Normal ctermbg=none
|
hi Normal ctermbg=none
|
||||||
" Local config
|
" Local config
|
||||||
if filereadable($HOME . "/.vimrc.local")
|
|
||||||
source ~/.vimrc.local
|
|
||||||
endif
|
|
||||||
let g:go_fmt_command = "goimports"
|
let g:go_fmt_command = "goimports"
|
||||||
nnoremap <leader><tab> :buffers<CR>:buffer<Space>
|
nnoremap <leader><tab> :buffers<CR>:buffer<Space>
|
||||||
set background=dark
|
set background=dark
|
||||||
|
let vim_markdown_preview_hotkey='<C-m>'
|
||||||
|
let vim_markdown_preview_github=1
|
||||||
|
let vim_markdown_preview_browser='Google Chrome'
|
||||||
|
|
||||||
|
if filereadable($HOME . "/.vimrc.local")
|
||||||
|
source ~/.vimrc.local
|
||||||
|
endif
|
||||||
|
@ -9,6 +9,7 @@ zstyle ':prezto:load' pmodule \
|
|||||||
'completion' \
|
'completion' \
|
||||||
'tmux' \
|
'tmux' \
|
||||||
'git' \
|
'git' \
|
||||||
|
'python' \
|
||||||
'prompt'
|
'prompt'
|
||||||
|
|
||||||
zstyle ':prezto:module:autosuggestions:color' found ''
|
zstyle ':prezto:module:autosuggestions:color' found ''
|
||||||
@ -19,6 +20,7 @@ zstyle ':prezto:module:git:status:ignore' submodules 'all'
|
|||||||
zstyle ':prezto:module:prompt' theme 'paradox'
|
zstyle ':prezto:module:prompt' theme 'paradox'
|
||||||
zstyle ':prezto:module:prompt' long-pwd 'yes'
|
zstyle ':prezto:module:prompt' long-pwd 'yes'
|
||||||
zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
|
zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
|
||||||
zstyle ':prezto:module:tmux:iterm' integrate 'yes'
|
zstyle ':prezto:module:tmux:auto-start' local 'yes'
|
||||||
|
zstyle ':prezto:module:tmux' session 'AddgeneImac'
|
||||||
zstyle ':prezto:module:python:info:virtualenv' format 'v:% v'
|
zstyle ':prezto:module:python:info:virtualenv' format 'v:% v'
|
||||||
|
|
||||||
|
@ -40,8 +40,9 @@ if [ -e ~/.ssh/id_addgene ];then
|
|||||||
ssh-add ~/.ssh/id_addgene
|
ssh-add ~/.ssh/id_addgene
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source ~/.bash_aliases
|
|
||||||
if [ -e $HOME/.credentials ];then
|
if [ -e $HOME/.credentials ];then
|
||||||
source $HOME/.credentials
|
source $HOME/.credentials
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
source ~/.bash_aliases
|
||||||
|
unsetopt share_history
|
||||||
|
Loading…
Reference in New Issue
Block a user