Skip to content

Instantly share code, notes, and snippets.

@ElMesa
ElMesa / taillog.sh
Last active September 3, 2021 19:37 — forked from masonwan/grep-color.sh
Colorize logs
tail -200 catalina.out | \
ack-grep --flush --passthru --color --color-match=red "^.*ERROR.*" | \
ack-grep --flush --passthru --color --color-match=green "^.*DEBUG.*" | \
ack-grep --flush --passthru --color --color-match=blue "^.*INFO.*"
####################################################################
# Colors available
#
# From Stackoverflow: http://stackoverflow.com/a/9626444
# Thanks to Andy Lester: http://stackoverflow.com/users/8454/andy-lester
@ElMesa
ElMesa / .bash_webdev-dependencies
Created December 2, 2014 16:05
Shell - List first depth level web dependencies (npm, Bower)
# Im using this at ~/.bashrc
#
# You could also put it in a external file "~/.bash_webdev-dependencies" and import it to ".bashrc" with:
#. ~/.bash_webdev-dependencies
#
# I guess you could also make .sh and soft linkit to somewhere in the $PATH, but this seems simpler and cleaner
################
##### npm #####
alias npmlistshort='npm list --depth=0'
@ElMesa
ElMesa / json-security-considerations.md
Last active August 29, 2015 14:10
JSON Security considerations

JSON Security considerations

From: (RFC4627) The application/json Media Type for JavaScript Object Notation (JSON)

Security considerations:

Generally there are security issues with scripting languages. JSON is a subset of JavaScript, but it is a safe subset that excludes assignment and invocation.