Skip to content

Instantly share code, notes, and snippets.

@xardit
Created May 25, 2016 20:50
Show Gist options
  • Save xardit/fc0f7c84a6c08701f7085bd49cdb96a0 to your computer and use it in GitHub Desktop.
Save xardit/fc0f7c84a6c08701f7085bd49cdb96a0 to your computer and use it in GitHub Desktop.
alias ll='ls -Fls'
alias la='ls -Flas'
alias psa='ps -A -r -ww'
alias c='clear'
# MacPorts Installer addition on 2014-08-19_at_22:36:10: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
getemails() {
grep -Eiorh '([[:alnum:]_.-]{1,64}@[[:alnum:].-]{1,253}?\.[[:alpha:]]{2,6})' "$@" "$1" | sort | uniq | tr '[:upper:]' '[:lower:]'
}
validMX() {
if `dig mx "$1" | grep -q 'ANSWER: 0'`; then
echo 'false'
else
echo 'true'
fi
}
tomp3() {
ffmpeg -i $1 -codec:a libmp3lame -qscale:a 2 -b:a 320k $2
}
dnsclean(){
echo "# remember"
echo "sudo discoveryutil udnsflushcaches"
sudo discoveryutil udnsflushcaches
}
svg2png(){
echo "#remember: "
echo "convert -density 1200 -resize 1200x1200 index.svg i.png"
convert -density 1200 -resize 1200x1200 "$1" "$1.png"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment