Skip to content

Instantly share code, notes, and snippets.

View eluttner's full-sized avatar
🏠
Working from home

eduardo luttner eluttner

🏠
Working from home
View GitHub Profile
@eluttner
eluttner / Makefile
Created August 9, 2019 10:57 — forked from miguelmota/Makefile
Makefile docker push to AWS Elastic Container Registry (ECR)
# Login to AWS registry (must have docker running)
docker/registry/login:
$$(aws ecr get-login --no-include-email --region us-east-1 --profile=mycompany)
# Build docker target
docker/build:
docker build -f Dockerfile --no-cache -t mycompany/myapp .
# Tag docker image
docker/image/tag:
@eluttner
eluttner / content_script.js
Created November 24, 2017 21:14
chrome-read-page-extension
chrome.runtime.sendMessage("nkohjkjhdcoklcopgnefoopkpggbmgcj", {data: "hello"},
function(response) {
console.log("RESPONSE");
console.log(response);
});
@eluttner
eluttner / docker-cheat-sheat.md
Created November 7, 2017 23:22 — forked from dwilkie/docker-cheat-sheat.md
Docker Cheat Sheet

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

@eluttner
eluttner / formatters.py
Created October 5, 2015 21:53 — forked from igorsobreira/formatters.py
Django form field for Brazilian Real (R$)
from django.template.defaultfilters import floatformat
from django.contrib.humanize.templatetags.humanize import intcomma
from django.utils.encoding import force_unicode
def decimal_to_real(value, precision=2):
'''
Receives a Decimal instance and returns a string formatted as brazilian Real currency:
12,234.00. Without the "R$".
'''
value = floatformat(value, precision)
@eluttner
eluttner / .bash_prompt
Last active August 29, 2015 14:16
BASH PROMPT
# @gf3’s Sexy Bash Prompt, inspired by “Extravagant Zsh Prompt”
# Shamelessly copied from https://github.com/gf3/dotfiles
# Screenshot: http://i.imgur.com/s0Blh.png
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
export PATH=/Library/PostgreSQL/9.3/bin/:"$PATH"
pip install psycopg2
@eluttner
eluttner / hack.sh
Created May 29, 2014 19:33 — forked from erikh/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#