Skip to content

Instantly share code, notes, and snippets.

View brunodasilvalenga's full-sized avatar

Bruno da Silva Valenga brunodasilvalenga

View GitHub Profile
import React, { Component } from 'react'
import {
Container,
Header,
Title,
Content,
Text,
Button,
Icon,
Left,
import React, { Component } from 'react'
import {
Navigator,
View,
BackAndroid
} from 'react-native'
import {
Drawer
} from 'native-base'
#!/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
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,
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++) {
@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)