Skip to content

Instantly share code, notes, and snippets.

View brunodasilvalenga's full-sized avatar

Bruno da Silva Valenga brunodasilvalenga

View GitHub Profile
@brunodasilvalenga
brunodasilvalenga / test-email.py
Last active May 4, 2016 17:14
Verify email box exists
#Verify email box exists
#Author: Bruno da Silva Valenga - <brunodasilvalenga.com.br>
#Created: 08/25/2014
#Usage: script.py [email protected]
#Install lib DNS: https://github.com/rthalley/dnspython
import socket, smtplib, re, sys, dns.resolver
addressToVerify = sys.argv[1]
match = re.match('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', addressToVerify)
getAluno(queryText=''){
queryText = queryText.toLowerCase().replace(/,|\.|-/g,' ').trim();
queryText = '%'+queryText+'%'
function asPlainObjectCollection(data) {
let array = []
let rows = !!data.res.rows.length ? data.res.rows : array
for (let i = 0; i < data.res.rows.length; i++) {
loadAlunos() {
this.loadingShow();
this.alunoData.getAluno().then((data) => {
this.alunos = [];
if(data.res.rows.length > 0) {
for(var i = 0; i < data.res.rows.length; i++) {
this.alunos.push(
{
id: data.res.rows.item(i).id,
firstName: data.res.rows.item(i).firstName,
#!/bin/bash
atual=`date +'%Y/%m/%d'`
ano=`date +'%Y'`
mes=`date +'%m'`
dia=`date +'%d'`
file_date=`date +'%Y_%m_%d'`
dir_nfe="/dados/nfe/"
touch /tmp/0.txt
import React, { Component } from 'react'
import {
Navigator,
View,
BackAndroid
} from 'react-native'
import {
Drawer
} from 'native-base'
import React, { Component } from 'react'
import {
Container,
Header,
Title,
Content,
Text,
Button,
Icon,
Left,
@brunodasilvalenga
brunodasilvalenga / DockerCleanupScripts.md
Created October 4, 2019 08:57
Docker - Cleanup resources (containers, volumes, images, networks) ...

Docker - How to cleanup (unused) resources

Cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

resource "aws_api_gateway_domain_name" "services_gateway" {
domain_name = "${local.workspace["services_gateway_hostname"]}"
regional_certificate_arn = "${data.aws_acm_certificate.domain_host.arn}"
endpoint_configuration {
types = ["REGIONAL"]
}
}
data "aws_route53_zone" "services_selected" {
resource "aws_s3_bucket" "app" {
bucket = "${var.org_name}-${local.workspace["app_app_name"]}-${local.workspace["environment_name"]}"
acl = "private"
}
module "app" {
source = "git::https://github.com/DNXLabs/terraform-aws-static-app.git?ref=1.1.1"
name = "${local.workspace["app_app_name"]}"
s3_bucket_id = "${aws_s3_bucket.app.id}"
image: dnxsolutions/musketeers:1.1.0
services:
- docker:18.03.1-ce-dind # needs to match gitlab runner version
variables:
DOCKER_HOST: "tcp://docker:2375"
stages:
- plan-developer
- apply-developer
- destroy-developer