Last active
May 15, 2024 07:14
-
-
Save sulincix/5f86836a44dbc0509d2dab47ea34e5a7 to your computer and use it in GitHub Desktop.
Bashrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# üşengeçlik | |
alias c='clear' | |
alias e='export' | |
alias a='alias' | |
alias t='touch' | |
alias m='mkdir -pv' | |
alias r='rm -rfv' | |
alias x='chmod +x -R' | |
alias h='history' | |
alias e='exit' | |
alias j='jobs -l' | |
alias s='sync' | |
alias rm='rm -I --preserve-root' | |
alias chown='chown --preserve-root' | |
alias chmod='chmod --preserve-root' | |
alias chgrp='chgrp --preserve-root' | |
alias clear='echo -ne "\033c" ; clear' | |
alias grh='grep -rnwi' | |
alias hs='history | grep' | |
alias ~="cd ~" | |
alias ..='cd ..' | |
alias ...="cd ../../" | |
alias ....="cd ../../../" | |
#diyarbakır keranesi modu (bol renkli çıktı) | |
alias grep='grep --color=auto' | |
alias egrep='egrep --color=auto' | |
alias fgrep='fgrep --color=auto' | |
if ls --color -d . >/dev/null 2>&1; then # GNU ls | |
eval "$(dircolors)" | |
alias ls='ls --color=always' | |
fi | |
alias ll='ls -l' | |
alias l='ls -l -a' | |
alias la='ls -a' | |
alias lll='ls -l -a | less -N' | |
alias less='less -N' | |
#PS1 PS2 | |
export PSMODE=0 # Disable sulin bashrc mode | |
function distro(){ | |
source /etc/os-release | |
NAME=${NAME,,} | |
echo ${NAME/ */} | |
} | |
PS1="\[\033[1m\]$$|$(distro)::" | |
unset distro | |
if [[ $UID -eq 0 ]] ; then | |
PS1+="\[\033[0;31m\]\u\[\033[00;1m\]@\h " | |
else | |
PS1+="\u@\h " | |
fi | |
PS1+="\[\033[0;31m\]\W \[\033[00m\](\$?)\[\033[0;31m\] \$ \[\033[00m\]" | |
export PS1 | |
export PS2="\[\033[1m\]>\[\033[00m\] " | |
# bazı önemli ama gereksiz işler | |
alias vi=nano | |
alias vim=nano | |
#alias nano='nano -l -q -x' | |
alias gc='git commit' | |
alias ga='git add' | |
alias gac='git add . && git commit' | |
alias gll='git pull' | |
alias gpsh='git push' | |
gpall(){ | |
curdir=$(pwd) | |
for dir in $(find -type d -iname .git | xargs dirname) ; do | |
cd $dir || true | |
git pull || true & | |
cd $curdir | |
done | |
wait | |
} | |
# Gerekli bikaç şey | |
alias envs='env | sort -V | less' | |
alias sort='sort -V' | |
alias hsc='rm -f ~/.bash_history' | |
if [[ $UID -eq 0 ]] ; then | |
umask 022 | |
else | |
umask 027 | |
fi | |
gg(){ | |
rm -vrf ~/.cache/* | |
rm -vrf ~/.thumbnails | |
rm -vrf ~/.local/share/TelegramDesktop/tdata/user_data | |
rm -vrf /tmp/* | |
} | |
alias ğ='gg' | |
# birkaç işe yarar çöp | |
if ! which sudo &>/dev/null ; then | |
sudo(){ | |
su -c "$@" | |
} | |
fi | |
killwine(){ | |
ps aux | grep "\.exe" | grep -v grep | awk '{print $2}' | xargs kill -9 &>/dev/null | |
killall winedevice.exe &>/dev/null | |
killall wineserver &>/dev/null | |
killall winedbg &>/dev/null | |
} | |
killport(){ | |
lsof -i | grep LISTEN | grep :$1 | awk '{print $2}' | xargs kill -9 &>/dev/null | |
} | |
ssh_forvard(){ | |
echo -n "Input source port: "; read source | |
echo -n "Input target port: "; read target | |
ssh -vvv -NR "$source":*:"$target" "$@" | |
} | |
nvrun(){ | |
env __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only MANGOHUD=0 $@ | |
} | |
connect(){ | |
ssh-copy-id $1 | |
ssh $@ | |
} | |
rm -f ~/.bash_history_* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set colored-stats On | |
set completion-ignore-case On | |
set completion-prefix-display-length 3 | |
set mark-symlinked-directories On | |
set show-all-if-ambiguous On | |
set show-all-if-unmodified On | |
set visible-stats On | |
set colored-completion-prefix on | |
set mark-modified-lines on | |
set menu-complete-display-prefix on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# her boku yükle | |
include /usr/share/nano/*.nanorc | |
set constantshow | |
set matchbrackets "(<[{)>]}" | |
set multibuffer | |
set nohelp | |
set smarthome | |
set tabsize 2 | |
set nonewlines | |
set autoindent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment