Skip to content

Instantly share code, notes, and snippets.

View tegila's full-sized avatar

Edson Tégila tegila

View GitHub Profile
@tegila
tegila / i2c.scanner.cpp
Last active January 10, 2018 17:41
QC2004A PCF8574AT 20x4 LCD DISPLAY
// I2C Scanner
// Written by Nick Gammon
// Date: 20th April 2011
#include <Wire.h>
void setup() {
Serial.begin (115200);
// Leonardo: wait for serial port to connect
@tegila
tegila / ml.parse.vb
Last active August 29, 2015 14:27
Percorre a fatura do ML procurando por roubos
Sub getTheRabit()
Dim i As Integer, j As Integer, k As Integer
Dim cuDate As String, newDate As String
Dim temp As String
With Worksheets("Report")
i = 16
Do Until .Cells(i, 2).Value = ""
k = 16
cuDate = .Cells(i, 2).Value
@tegila
tegila / sim800l.cpp
Last active October 15, 2015 01:34
SIM800L
/*
### Esquema de ligação ###
- Ligar o VCC do SIM800L a uma fonte +4V 2A estável
- Conectar o GND do SIM800L ao GND do Arduino e também ao GND da fonte.
> Todos alimentados agora podemos ligar a parte da comunicação serial
- Ligar o RX do SIM800L (ENTRADA) ao Digital 11 do Arduino
- Ligar o TX do SIM800L (SAIDA) ao Digital 10 do Arduino
## Utilização:
@tegila
tegila / Artnet.cpp
Last active November 11, 2015 21:33
/*The MIT License (MIT)
Copyright (c) 2014 Nathanaël Lécaudé
https://github.com/natcl/Artnet, http://forum.pjrc.com/threads/24688-Artnet-to-OctoWS2811
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@tegila
tegila / SDWebBrowser.cpp
Last active January 5, 2016 19:35
adafruit SDWebBrowser updated
/*
* USERS OF ARDUINO 0023 AND EARLIER: use the 'SDWebBrowse.pde' sketch...
* 'SDWebBrowse.ino' can be ignored.
* USERS OF ARDUINO 1.0 AND LATER: **DELETE** the 'SDWebBrowse.pde' sketch
* and use ONLY the 'SDWebBrowse.ino' file. By default, BOTH files will
* load when using the Sketchbook menu, and the .pde version will cause
* compiler errors in 1.0. Delete the .pde, then load the sketch.
*
* I can't explain WHY this is necessary, but something among the various
* libraries here appears to be wreaking inexplicable havoc with the
pragma solidity 0.4.11;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
@tegila
tegila / brlt.sol
Last active October 20, 2017 12:57
pragma solidity ^0.4.18;
// ----------------------------------------------------------------------------------------------
// BRL TOKEN EXCHANGE CONTRACT
// Enjoy. (c) tegila 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/issues/20
contract ERC20Interface {
/* olá! */
function DesenvolvedorWeb() {
return "Marcelo Paixão Resende";
}
/* entre em contato */
DesenvolvedorWeb.contato = {
celular: "(034) 99131-4105",
email: "marcelopaixaoresende@gmail.com",
skype: "marcelopaixaoresende",
version: '3'
services:
samba:
image: dperson/samba
environment:
TZ: 'EST5EDT'
tmpfs:
- /tmp
restart: unless-stopped
volumes:
const func1 = (a, b, callback) => {
callback(a + b);
};
const func2 = (a, b) => {
func1(a, b, result => {
console.log(result);
});
};