added .zshenv and few edits

This commit is contained in:
2021-02-04 17:39:51 +01:00
parent c2dd72a8b4
commit aa4f403326
5 changed files with 186 additions and 10 deletions
+156
View File
@@ -0,0 +1,156 @@
alias v=nvim
alias restart='exec $SHELL'
alias ez='nvim ~/.zshrc'
alias e='nvim ~/.zshenv'
alias mem="du -sh"
alias memfiles="du -sh * | sort -rh;"
alias vimrc='nvim ~/.vimrc'
alias ev='nvim ~/.config/nvim'
alias todo="nvim ~/programs/markdown/todolist/todolist.md"
alias t="todo"
alias alacritty="v ~/.config/alacritty/alacritty.yml"
alias isep="cd /Volumes/$/isep"
alias desk="desktop"
alias ports="lsof -Pn -i4"
alias ports2="netstat -ap tcp"
alias network="watch -n 1 \"netstat -p tcp\""
alias cat=ccat
### Games ###
alias tetris=bastet
alias spaceinvader=ninvaders
alias tshark="/Applications/Wireshark.app/Contents/MacOS/tshark"
# Git shortcuts
alias gi="git init"
alias ga="echo 'git add -A'; git add -A"
alias gr="git remote"
alias grv="git remote -v"
alias gs="git status"
alias grmc="git rm -r --cached ."
function gc { echo "git commit -m \"$@\""; eval "git commit -m \"$@\"" }
function gp {
if [ "$#" -eq 0 ]; then
echo "git push"
eval "git push"
else
echo "git push \"$@\""
eval "git push \"$@\""
fi
}
function gn { ga; gc $@ }
function gt { ga; gc $@; git push }
function gfp {
git remote add origin $@
git branch -M master
git push -u origin master
}
# Navigation shortcuts
alias home='cd ~'
alias desktop="cd ~/desktop"
alias documents="cd ~/documents"
alias images="cd ~/images"
alias downloads="cd ~/downloads"
# Programming shortcuts
alias programs='cd ~/Programs/'
alias website='cd ~/Programs/Website'
alias web='cd ~/Programs/Web'
alias javascript='cd ~/Programs/Web/Javascript'
alias canvas='cd ~/Programs/Web/Javascript/Canvas'
alias html='cd ~/Programs/Web/Html'
alias css="cd ~/Programs/Web/Css"
alias markdown="cd ~/Programs/Markdown"
alias wadjet='cd ~/Unity Games/Asteroids'
alias gitprojects="cd ~/git-projects"
alias brain="cd ~/programs/BrainPerformer"
# Quick temporary aliases
alias asteroids="cd ~/Programs/Web/Javascript/Canvas/Asteroids"
function p { cd ~/Programs/$@ }
function pj { cd ~/git-projects/$@ }
export programs=~/programs
# Python shortcuts
alias pip=pip3
alias py=python
alias activate="source env/bin/activate"
alias py20='cd ~/Programs/Python/Repository-2020'
alias pygames='cd ~/Programs/Python/Repository-Games'
alias pyml='cd ~/Programs/Python/Machine-Learning'
alias pyhome='cd ~/Programs/Python'
alias pypackages='cd /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/'
alias pypi='cd ~/Programs/Python/Pypi'
# Python programs
alias webpfix='py /Users/marcpartensky/Programs/Python/Repository-2020/webpfix.py'
alias glou="py /Users/marcpartensky/git-projects/Glou"
alias noscreenshots='python /Users/marcpartensky/Programs/Python/Repository-2020/no-screenshots.py'
alias video2gif='python /Users/marcpartensky/Programs/Python/Repository-2020/video2gif.py'
alias hyperplanning="python /Users/marcpartensky/programs/python/repository-2020/isep-hyperplanning.py"
alias portail="python /Users/marcpartensky/programs/python/repository-2020/isep-portal.py"
# Messenger
alias vivelescookies="chrome https://www.facebook.com/messages/t/1830795903602344"
alias alexandre="chrome https://www.facebook.com/messages/t/alexandre.partensky"
alias maman="chrome https://www.facebook.com/messages/t/pew.pradithja.1"
alias pierre="chrome https://www.facebook.com/messages/t/pierre.barthet.5"
alias bigot="chrome https://www.facebook.com/messages/t/alexandre.bgt.12"
alias valentin="chrome https://www.facebook.com/messages/t/valentin.colin.73"
alias samy="chrome https://www.facebook.com/messages/t/samy.haffoudhi"
alias paul="chrome https://www.facebook.com/messages/t/100009925413499"
alias arnaud="chrome https://www.facebook.com/messages/t/100013962188251"
alias etienne="chrome https://www.facebook.com/messages/t/etienne.faviere"
alias baptiste="chrome https://www.facebook.com/messages/t/100009848792300"
alias lovinsky="chrome https://www.facebook.com/messages/t/Skyns82"
alias maxime="chrome https://www.facebook.com/messages/t/100011382659168"
alias jp="chrome https://www.facebook.com/messages/t/jeanpascal.vostatek"
alias maximilien="chrome https://www.facebook.com/messages/t/maximilien.delagastine"
alias sacha="chrome https://www.facebook.com/messages/t/sacha.montassiet.1"
alias thibault="chrome https://www.facebook.com/messages/t/thibaut.moi"
alias philippe="chrome https://www.facebook.com/messages/t/100005499708371"
alias medhi="chrome https://www.facebook.com/messages/t/mehdi.haffoudhi.9"
alias hugues="chrome https://www.facebook.com/messages/t/hugues.rubin"
alias kevin="chrome https://www.facebook.com/messages/t/pandasus.pandasus.1"
# Applications
alias chrome="open -a 'Google Chrome' $1"
alias unity="open -a 'Unity'"
alias daisy="open -a 'DaisyDisk'"
alias terminal="open -a 'iTerm'"
alias postman="open -a 'Postman'"
alias keybr="chrome https://www.keybr.com/"
alias touch-typing="open -a 'Google Chrome' 'https://www.typingclub.com/sportal/program-3.game'"
alias change-extension="for file in *.$1; do mv '$file' '${file%.txt}.$2'; done"
function finder { open . }
function search { open -a 'Google Chrome' "https://www.google.com/search?q=$*" }
function youtube { open -a 'Google Chrome' "https://www.youtube.com/results?search_query=$1" }
alias yt=youtube
function messenger { open -a 'Google Chrome' "https://www.facebook.com/messages"; }
function messenger-terminal { exec "fb-messenger-cli"; }
alias youtube='cd /Volumes/\$/Youtube'
filename=""
function copy {
filename=$1
echo $filename is copied
cat $1 | pbcopy
}
alias filename='echo $filename'
function paste {
echo $filename is pasted
pbpaste > $filename
}
# This is why being lazyness in programming even exists
function cheat { curl cheat.sh/"$@"; }
function compressgif {
ffmpeg -i $1 -vf scale=320:-1 -r 10 -f image2pipe -vcodec ppm - | convert -delay 5 -loop 0 - $2
}
+10 -5
View File
@@ -591,9 +591,10 @@ live_config_reload: true
# If the same trigger is assigned to multiple actions, all of them are executed
# at once.
key_bindings:
#- { key: Paste, action: Paste }
#- { key: Copy, action: Copy }
#- { key: L, mods: Control, action: ClearLogNotice }
# - { key: Paste, action: Paste }
# - { key: Copy, action: Copy }
# - { key: Copy, action: ClearSelection }
# - { key: L, mods: Control, action: ClearLogNotice }
#- { key: L, mods: Control, mode: ~Vi, chars: "\x0c" }
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, }
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
@@ -671,7 +672,10 @@ key_bindings:
- { key: K, mods: Command, action: ClearHistory }
- { key: V, mods: Command, action: Paste }
- { key: C, mods: Command, action: Copy }
- { key: C, mods: Command, mode: Vi, action: ClearSelection }
# - { key: C, mods: Command, action: ClearSelection }
# - { key: Copy, mods: Command, action: ClearSelection }
# - { key: C, mods: Command, mode: Vi, action: Copy }
# - { key: Copy, mods: Command, mode: Vi, action: ClearSelection }
- { key: H, mods: Command, action: Hide }
- { key: M, mods: Command, action: Minimize }
- { key: Q, mods: Command, action: Quit }
@@ -685,7 +689,8 @@ key_bindings:
- { key: Left, mods: Command|Alt, chars: ":tabprevious\x0a" }
- { key: Right, mods: Command|Alt, chars: ":tabnext\x0a" }
- { key: Slash, mods: Command, chars: ":Commentary\x0a" }
- { key: I, mods: Command, chars: ":\x1b!\"%:p\"\x0a" }
- { key: I, mods: Command, chars: "\x1b:!\"%:p\"\x0a" }
- { key: Y, mods: Command, chars: "\x1b:!pylint %\x0a" }
- { key: A, mods: Command, chars: "\x1bggVG" }
# - { key: J, mods: Command, chars: "v\x0a" }
+3 -3
View File
@@ -10,7 +10,7 @@ export TEST="This is a test"
export PRODUCTION=false
export DEBUG_VALUE="True"
export DEVELOPMENT=true
export WEBSITE_URL="https://websiteofmarcpartensky.herokuapp.com"
export WEBSITE_URL="https://marcpartensky.herokuapp.com"
export WEBSITE_USER="marcpartensky"
export WEBSITE_PASSWORD="glouaymay"
export ISEP_ID="mapa60217"
@@ -49,11 +49,11 @@ export BRAWLSTARS_ID="8YC89YRL0"
export BRAWLSTARS_MAIL="marc.gptl44@gmail.com"
export BRAWLSTARS_PASSWORD="marc.partensky@brawlstars"
export BRAWLSTARS_TOKEN="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiIsImtpZCI6IjI4YTMxOGY3LTAwMDAtYTFlYi03ZmExLTJjNzQzM2M2Y2NhNSJ9.eyJpc3MiOiJzdXBlcmNlbGwiLCJhdWQiOiJzdXBlcmNlbGw6Z2FtZWFwaSIsImp0aSI6ImQzY2EzNjMxLWIwZTAtNDA4NC05MGUwLTIyMDg5MmY2OTMwNiIsImlhdCI6MTU5MjUxNzE0NCwic3ViIjoiZGV2ZWxvcGVyLzdmYzlhMjM2LTVkMTMtMzgxNC1kYmJkLWUwYmU0YzFlOTdjMiIsInNjb3BlcyI6WyJicmF3bHN0YXJzIl0sImxpbWl0cyI6W3sidGllciI6ImRldmVsb3Blci9zaWx2ZXIiLCJ0eXBlIjoidGhyb3R0bGluZyJ9LHsiY2lkcnMiOlsiOTEuMTY1LjIxLjg3Il0sInR5cGUiOiJjbGllbnQifV19.EHXW9ji-11Av8p9oFBpQ02idYPGxapNKbFG6P6AprjlgkLLjZ1WN2VM7hkM2b9aPjJKbIlmE4BJEij5dvM-rfg"
export PP_PASSWORD="yaM-yauolG44"
export JAVA_HOME=$(/usr/libexec/java_home)
export DISCORD_PREFIX="?"
export DISCORD_DEPLOYMENT="DEVELOPMENT"
export YTOPTS="-ciw -x --audio-format 'mp3' --audio-quality 0 -f bestaudio --embed-thumbnail -o '%(title )s.%(ext)s' --rm-cache-dir"
export PP_PASSWORD="yaM-yauolG44"
export JAVA_HOME=$(/usr/libexec/java_home)
# For Pyenv
# export PYENV_ROOT="$HOME/.pyenv"
+12 -1
View File
@@ -89,7 +89,7 @@ function keybr {
}
function speedtest {
curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -
python /usr/local/marc/speedtest.py
}
function dl-music {
@@ -111,3 +111,14 @@ function p {
function pj {
cd ~/git-projects/$@
}
function nodesktopicon {
defaults write com.apple.finder CreateDesktop false
killall Finder
}
function desktopicon {
defaults write com.apple.finder CreateDesktop true
killall Finder
}
+5 -1
View File
@@ -1,9 +1,11 @@
export DOTFILES_PATH=$(pwd)
# vim mode inside the terminal
set -o vi
set editing-mode vi
set keymap vi
set shiftwidth=4
set clipboard=unnamed
set clipboard=unnamedplus
#\\\_ COMPLETIONS _///#
@@ -63,6 +65,8 @@ source ${0:a:h}/aliases.sh
source ${0:a:h}/functions.sh
source ${0:a:h}/exports.sh
ln -snf ${0:a:h}/.zshenv ~
# When started as 'evim', evim.vim will already have done these settings, bail out.
# if v:progname =~? "evim"
# finish