Languages
89 gist results
89 gist results
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
| # enable keeping history timestamps and set display format to ISO-8601 | |
| export HISTTIMEFORMAT="%F %T " | |
| # ignore duplicates and commands starting with space | |
| HISTCONTROL=ignoreboth | |
| # ignore specific commands (full-length match) | |
| HISTIGNORE=”?:cd:ls:ll:bg:fg:vim:git status” | |
| # disable terminal flow control key binding, so that ^S will search history forward | |
| stty -ixon |
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
| # unlimit history | |
| export HISTFILESIZE= | |
| export HISTSIZE= | |
| # color history out | |
| export HISTTIMEFORMAT="[$(tput setaf 6)%F %T$(tput sgr0)]: " | |
| # append to the history file, don't overwrite it | |
| shopt -s histappend |
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
| #!/bin/bash | |
| # Set a default shell prompt: | |
| function promptcmd() { | |
| ret=$? | |
| rst='\[\e[0m\]' | |
| if [[ $ret = 0 ]]; then | |
| color='\[\e[0;32m\]' | |
| ret='' | |
| else |
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
| #additions | |
| # For switching to mounted home easily | |
| cd() { | |
| if [[ $@ == "m~" ]]; then | |
| command cd "/mnt/c/Users/david" | |
| else | |
| command cd "$@" | |
| fi | |
| } |
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
| #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] \$ ' | |
| #\[\033]0;$MSYSTEM:\w\007 \033[32m\]\u@\h \[\033m\w$(__git_ps1)\033[0m\] $ | |
| # If not running interactively don't do anything | |
| case $- in | |
| *i*) ;; | |
| *) return;; | |
| esac |
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
| # IN ADDITION TO EVERYTHING THAT IS ALREADY INCLUDED: | |
| # Auto-complete command from history | |
| # http://lindesk.com/2009/04/customize-terminal-configuration-setting-bash-cli-power-user/ | |
| export INPUTRC=~/.inputrc | |
| # I want to have a longer history than what is included by default and where duplicates are deleted. | |
| export HISTCONTROL=ignoreboth:erasedups | |
| export HISTSIZE=10000 | |
| # Enable history appending instead of overwriting. #139609 |
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
| # 1) set CUDA paths even if this bash session isnt running interactively | |
| export CUDA_HOME="/usr/local/cuda" | |
| export PATH="$CUDA_HOME/bin:$PATH" | |
| export LD_LIBRARY_PATH="$CUDA_HOME/lib64:$LD_LIBRARY_PATH" | |
| export CPATH="$CUDA_HOME/include:$CPATH" | |
| export LIBRARY_PATH="$CUDA_HOME/lib64:$LIBRARY_PATH" | |
| export TF_MIN_GPU_MULTIPROCESSOR_COUNT='3' |
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
| export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[0;36m\]$(__git_ps1 " (\[\033[1;31m\]%s\[\033[0;36m\]) ")\[\033[00m\]\$ ' |
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
| # Store 10,000 history entries | |
| export HISTSIZE=10000 | |
| # Don't store duplicates | |
| export HISTCONTROL=erasedups | |
| # Append to history file | |
| shopt -s histappend | |
| # Conveniently download external resources: | |
| # fetch http://example.com/library.tar.gz | |
| # fetch ftp://example.com/file.zip |
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
| # ~/.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 | |
| printf "" |