Skip to content

Instantly share code, notes, and snippets.

@mi-skam
Created June 18, 2020 17:36
Show Gist options
  • Save mi-skam/67fa9c198a12ff2e92e8dffca0ff9839 to your computer and use it in GitHub Desktop.
Save mi-skam/67fa9c198a12ff2e92e8dffca0ff9839 to your computer and use it in GitHub Desktop.
WSL2: Debian - parts of bashrc
# custom
#[ -n ${WSL_AUTH_SOCK} ] && export SSH_AUTH_SOCK=${WSL_AUTH_SOCK}
#export SSH_AUTH_SOCK=/windows/c/Users/plumps/AppData/Local/Temp/ssh-agent.sock
#Nix
export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock
ss -a | grep -q $SSH_AUTH_SOCK
if [ $? -ne 0 ]; then
rm -f $SSH_AUTH_SOCK
( setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork & ) >/dev/null 2>&1
fi
. /home/plumps/.nix-profile/etc/profile.d/nix.sh
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
export FZF_DEFAULT_OPS="--extended"
export FZF_DEFAULT_COMMAND="fd --type f"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export GITHUB_SECRET="4b656947fa98c3495afcc22eb5e019a775b2a66b"
export EDITOR=vim
function git_repo_delete(){
curl -L \
-H "Authorization: token $GITHUB_SECRET" \
-H "Content-Type: application/json" \
-X DELETE https://api.github.com/repos/$1 \
| jq .
}
export DISPLAY="$(awk '/nameserver/ { print $2 }' < /etc/resolv.conf)":0
export PULSE_SERVER="tcp:ohmy"
alias nmap='"/windows/c/Program Files (x86)/Nmap/nmap.exe"'
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/plumps/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/plumps/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/plumps/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/plumps/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
export PATH="/windows/c/Users/plumps/go/bin/:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment