Skip to content

Instantly share code, notes, and snippets.

View dsquier's full-sized avatar

dsquier dsquier

View GitHub Profile
@dsquier
dsquier / strip_ext.awk
Created April 11, 2014 21:10
AWK function to strip a file extension
## Strip the trailing extension from a file
strip_ext() {
FILENAME=$1
EXTENSION=`echo $FILENAME | gawk -F. '{ print "."$NF }'`
echo $FILENAME | awk -F$EXTENSION '{ print $1 }'
}
@dsquier
dsquier / .jsbeautifyrc
Last active June 3, 2017 22:58
My jsbeautify file
{
"indent_size": 2,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"end_with_newline": true,
"brace_style": "collapse,preserve-inline",
"wrap_line_length": 200,
"max_preserve_newlines": 2
## ENVIRONMENT
stty erase ^H
set -o vi
PS1="\u:\$PWD> "
## ALIASES
alias c="clear"
alias l="ls -lt"
alias ll="ls -lat"