Skip to content

Instantly share code, notes, and snippets.

View etiennemarais's full-sized avatar
🇿🇦
...

Etienne Marais etiennemarais

🇿🇦
...
View GitHub Profile
@etiennemarais
etiennemarais / .zshrc
Last active July 18, 2018 14:15
Quick alias to remove and clean untagged docker images and stopped containers.
#
# Credit to http://jimhoskins.com/2013/07/27/remove-untagged-docker-images.html
#
# Add this to your bash profile.
#
clean_docker () {
# Remove stopped containers
docker rm $(docker ps -a -q);
# Remove untagged images
@etiennemarais
etiennemarais / logslaravel.sh
Last active September 17, 2018 11:24 — forked from jakebathman/logslaravel.sh
Tail Laravel logs and filter out the stack traces
tail -f -n 450 laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
[alias]
# Git Commit, Add all and Push — in one step.
cap = "!f() { git add .; git commit -m \"$@\"; }; f"
# NEW.
new = "!f() { git cap \"📦 NEW: $@\"; }; f"
# IMPROVE.
imp = "!f() { git cap \"👌 IMPROVE: $@\"; }; f"
# FIX.
fix = "!f() { git cap \"🐛 FIX: $@\"; }; f"
@etiennemarais
etiennemarais / regex.md
Created April 11, 2016 13:49
Regular expression for handlebars variables, includes, if/else blocks and unescaped variables

Regex

{{[{]?(.*?)[}]?}}

Captures the value of the variable name in a handlebars template

{{> components/templates/email/includes/email-tr-spacer }}
{{# deliveryAddress }}