Skip to content

Instantly share code, notes, and snippets.

@WyrdNexus
Last active July 6, 2018 19:13
Show Gist options
  • Save WyrdNexus/282b1028e32521472c0e81ae838f38f5 to your computer and use it in GitHub Desktop.
Save WyrdNexus/282b1028e32521472c0e81ae838f38f5 to your computer and use it in GitHub Desktop.
basic linux CLI cheatsheat
# Terminal Color Fix OneLiner
printf "# Terminal Dark Color Fix\n\n" > ~/bash_tony.sh; echo " PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;97m\]\w\[\033[00m\]\$ '" >> ~/bash_tony.sh; printf "\nLS_COLORS='$(echo $LS_COLORS | sed -r 's/:di=..;..:/:di=01;97:/g')'\nexport LS_COLORS\n\n# Project Quick move\nPROJECT_DIR='/var/www/SITEROOT/dev'\nexport PROJECT_DIR\nalias cdd='cd \$PROJECT_DIR;ll'\n\n" >> ~/bash_tony.sh; chmod 700 ~/bash_tony.sh; ~/bash_tony.sh;printf "\n\n. ~/.bash_tony\n" >> .profile;
# Sed
sed -r 's/::FIND::/::REPLACE::/g'
#ex:
echo "aab abc 123" | sed -r 's/[abc\s]+/_/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment