Skip to content

Instantly share code, notes, and snippets.

View DrSLDR's full-sized avatar

Jonas A. Hultén DrSLDR

View GitHub Profile
@DrSLDR
DrSLDR / bash.bashrc
Last active August 29, 2015 14:07
PS1 variable
if [[ ${EUID} == 0 ]] ; then
PS1='${debian_chroot:+($debian_chroot)}\[$(tput bold)\]\[$(tput setaf 7)\][\t]\[$(tput setaf 1)\]\h\[$(tput setaf 7)\](\[$(tput setaf 4)\]\W\[$(tput setaf 7)\])\$ \[$(tput sgr0)\]'
else
PS1='${debian_chroot:+($debian_chroot)}\[$(tput bold)\]\[$(tput setaf 7)\][\t]\[$(tput setaf 2)\]\u@\h\[$(tput setaf 7)\](\[$(tput setaf 4)\]\W\[$(tput setaf 7)\])\$ \[$(tput sgr0)\]'
fi
@DrSLDR
DrSLDR / .bashrc
Last active January 5, 2024 13:59
.bashrc
alias wow='git status'
alias much=git
alias such=git
alias very=git
alias many=git
alias fuck='sudo $(history -p \!\!)'
alias lsa='ls -Al'
alias gitkat='gitg --all'
alias glug='git log --oneline'
alias psgr='ps -e | grep '
@DrSLDR
DrSLDR / blog-resizer.sh
Last active September 20, 2015 20:53
A script I use to (bulk) resize images to a largest dimension of 1080px, which I use for my blog.
#!/bin/bash
#Fundamentals
ALLMODE=0
# Get parameter
if [ -z "$1" ]; then
echo Filename or -all flag needed
exit 1
elif [ "$1" == "-all" ]; then