Skip to content

Instantly share code, notes, and snippets.

View diegobdev's full-sized avatar

Diego Borges diegobdev

View GitHub Profile
@diegobdev
diegobdev / busca-google.js
Last active November 4, 2015 15:21
Automação Web com CasperJS - Script #1 - Busca por CasperJS e PhantomJS no Google
//Script #1 sobre Automação Web usando CasperJS
//Primeiramente, é criada uma variável do tipo array (pense em uma planilha do excel) que conterá links
var links = [];
// Aqui é feita a definição do módulo do casperJS
// Quando for utilizado o módulo do CasperJS sem a suite de testes, a definicação deverá ser desta forma
var casper = require('casper').create();
// Neste momento é criada uma função que será chamada mais a frente para retornar os links
function getLinks() {
@diegobdev
diegobdev / git-tag-delete-local-and-remote.sh
Created September 20, 2017 19:56 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@diegobdev
diegobdev / pre-commit.run-pytest.sh
Created August 22, 2019 19:35 — forked from BARJ/pre-commit.run-pytest.sh
pre-commit hook that runs pytest
#!/bin/sh
RED='\033[0;31m'
NC='\033[0m' # No Color
test_results=$(script -q /dev/null pipenv run python -m pytest ./test -v --tb=no)
if [ $? -eq 1 ]; then
printf "${RED}CANNOT COMMIT, PYTEST FAILED\n\nPYTEST RESULTS:\n"
echo "$test_results"
exit 1
fi
@diegobdev
diegobdev / script.sh
Created November 14, 2019 19:22 — forked from MitchyBAwesome/script.sh
Bash Script to Setup Fargate Service
#!/bin/bash
ACCOUNT_ID="xxxxxxxx" && \
REGION="us-west-2" && \
REPO="go-http-server"
# Login to ecr
$(aws ecr get-login --no-include-email --region ${REGION})
@diegobdev
diegobdev / README.md
Created January 24, 2020 20:06 — forked from vranystepan/README.md
ECR push helper

AWS ECR push helper

Example

build your Docker image first

docker build -t tmp-image:latest
@diegobdev
diegobdev / download-helpscout-mailbox.py
Last active October 27, 2021 16:48 — forked from jikamens/download-helpscout-mailbox.py
Python script for download conversations, customers, and attachments from a Help Scout Mailbox (v1 API)
#!/usr/bin/env python
"""Download conversations, customers, and attachments from a Help Scout mailbox - using v1 API
Written by Jonathan Kamens (jik@kamens.us).
Released into the public domain.
Email me patches if you have enhancements you'd like me to incorporate. Don't
bother emailing me bug reports or suggestions; this script does exactly what I
@diegobdev
diegobdev / download-helpscout-mailbox.py
Created October 27, 2021 22:20
Python script for download conversations, customers, and attachments from a Help Scout Mailbox (v2 API)
#!/usr/bin/env python
"""Download conversations, customers, and attachments from a Help Scout mailbox
Written by Jonathan Kamens (jik@kamens.us).
V2 API modified by Diego Borges.
Released into the public domain.
Email me patches if you have enhancements you'd like me to incorporate. Don't