Skip to content

@kevin-wijaya
kevin-wijaya / .bashrc
Last active June 19, 2024 00:59
My bash configuration for terminal prompt strings
# style
light_red="\033[1;31m"
yellow="\033[1;33m"
light_blue="\033[1;34m"
light_purple="\033[1;35m"
bold="\033[1m"
end="\033[0m"
# setup ps1
update_ps1() {
@michaelrdolan
michaelrdolan / .bashrc
Last active March 4, 2025 20:20
bashrc for showing k8s context in prompt
#from unix.stackexchange - https://unix.stackexchange.com/questions/124407/what-color-codes-can-i-use-in-my-bash-ps1-prompt
black_txt='\e[0;30m' # Black
red_txt='\e[0;31m' # Red
green_txt='\e[0;32m' # Green
yellow_txt='\e[0;33m' # Yellow
blue_txt='\e[0;34m' # Blue
purple_txt='\e[0;35m' # Purple
cyan_txt='\e[0;36m' # Cyan
white_txt='\e[0;37m' # White
PS1="$cyan_txt"'\w:'$yellow_txt$(kubectl config current-context)":$white_txt "
@Distortedlogic
Distortedlogic / .bashrc
Created March 7, 2025 22:30
Default .bashrc
. "$HOME/.cargo/env"
. "$HOME/.rye/env"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# pnpm
export PNPM_HOME="/home/entropybender/.local/share/pnpm"
case ":$PATH:" in
@ChrisKimZHT
ChrisKimZHT / .bashrc
Created April 26, 2025 15:41
.bashrc
export LD_LIBRARY_PATH=/usr/lib/wsl/lib:$LD_LIBRARY_PATH
export PATH=$PATH:/usr/local/cuda/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64
export BROWSER=wslview
function switch_cuda {
if [[ $1 =~ ^[0-9]+\.[0-9]+$ ]]; then
sudo rm /usr/local/cuda
@codefromrvk
codefromrvk / .bashrc
Created April 27, 2025 16:38
Terminal aliases
# Your existing configs ...
# Aliases
alias c="clear"
alias ga="git add ."
alias gs="git status"
alias gc="git commit -m"
alias r1="git reset --soft HEAD@{1}"
alias gp="git push"
alias gpl="git pull"
@MasterDisaster
MasterDisaster / .bashrc
Last active July 1, 2025 19:05
OracleLinux9 | WSL => .bashrc file
# .bashrc
#
# Author: Blazej Kaczmarek
# GH profile: github.com/MasterDisaster
# email: fajny.masz.tornister@gmail.com
# ORCID: https://orcid.org/0009-0003-1070-8870
# PEN OID: 1.3.6.1.4.1.53685
# PEN ASN.1: {iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) 53685}
# PEN OID url: http://oid-info.com/get/1.3.6.1.4.1.53685
# Description: It's kind of a rc starting script that simply does a LINTING on dirs in PATH env
@brendon-stephens
brendon-stephens / .bashrc
Last active June 10, 2025 23:47
My personal customizations for ~/.bashrc
bind 'set show-all-if-ambiguous on'
# --- Aliases ---
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
alias please='sudo $(fc -ln -1)' # Rerun last command with sudo
alias top10cpu='ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | head -n 10'
alias top10mem='ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head -n 10'
alias ports='ss -tuln'
alias listening='lsof -i -P -n | grep LISTEN'
function timestamp_output() {
{ "$@"; } 2>&1 | perl -MTime::HiRes=time -MPOSIX=strftime -ne '
BEGIN { $prev = time(); }
$now = time();
$delta = sprintf("%.3f", $now - $prev);
$prev = $now;
printf "%ss %s %s", $delta, strftime("%Y-%m-%d %H:%M:%S", localtime($now)), $_;
'
}
@LV
LV / .bashrc
Last active September 2, 2025 23:50
# .bashrc
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
export PROMPT_COMMAND='branch=$(git branch --show-current 2>/dev/null); PS1="\[$(tput setaf 28)\]${branch:+($branch) }\[$(tput setaf 226)\]\u\[$(tput setaf 220)\]@\[$(tput setaf 214)\]\h \[$(tput setaf 33)\]\w \[$(tput sgr0)\]$ "'
# Aliases
alias grep="grep --color=auto"
alias gg="lazygit"
# #!/bin/bash
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac