Skip to content

Instantly share code, notes, and snippets.

@dhhdev
Last active July 1, 2016 06:21
Show Gist options
  • Save dhhdev/1d9f80507fcecd36099c0523a90dfffb to your computer and use it in GitHub Desktop.
Save dhhdev/1d9f80507fcecd36099c0523a90dfffb to your computer and use it in GitHub Desktop.
A very simple set of .zsh (oh-my-zsh) custom stuff. Can be loaded in your ~/.oh-my-zsh/custom/ directory.
#
# ~/.oh-my-zsh/custom/gcc.zsh
#
# gcc wrapper for compiling ansi
# Usage: compile_ansi [output][files]
compile_ansi()
{
OUTPUT=$1
shift
gcc -ansi -Wall -pedantic $@ -o ${OUTPUT}
}
#
# ~/.oh-my-zsh/custom/tools.zsh
#
# digg tool - print IPv4 of (DNS) domain
# Usage: digg domain.tld
digg()
{
ping -c1 $1 | awk 'NR==1{ print $3 }'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment