Skip to content

Instantly share code, notes, and snippets.

View carlosdelfino's full-sized avatar
💭
De volta as origens, com o canal Basicão da Eletrônica

Carlos Delfino carlosdelfino

💭
De volta as origens, com o canal Basicão da Eletrônica
View GitHub Profile
@carlosdelfino
carlosdelfino / Testa Dominios.html
Created October 18, 2010 22:04
Demonstra como deve ser um script que abre novas janelas com base num dominio selecionado!
<html>
<head>
</head>
<body>
<form onsubmit="return false;">
<input id="textfield" value="www" onchange="
var basedomain = document.getElementById('basedomain').value;
var value = this.value;
var finalurl = 'http://'+value+'.'+basedomain;
alert('Tentado acessar: '+finalurl);
@mheadd
mheadd / fastagi.js
Created October 21, 2010 15:18
Node.js script to execute FastAGI application
// Include required modules.
var net = require('net');
var sys = require('sys');
// Create a TCP server and listen on FastAGI port.
var server = net.createServer();
server.listen(4573, '127.0.0.7');
// Add a listener for new connections.
server.addListener('connection', fastAGI);
@carlosdelfino
carlosdelfino / httpstream.dpr
Created April 16, 2011 19:25
A idéia é receber um fluxo continuo de texto de um servidor WEB e imprimir sempre que preciso.
program httpstream;
uses
Forms,
Ustream in 'Ustream.pas' {Fstream};
{$R *.res}
begin
Application.Initialize;
@fnando
fnando / gist:2420869
Created April 19, 2012 13:10
My JavaScript Guidelines
@carlosdelfino
carlosdelfino / GPS_Encoder_Barometer_Reader.cpp
Created July 17, 2012 20:20
Ler da FastSerial o GPS e Barometer e do Pino 2 e 3 o Encoder a 2000Khz
FastSerialPort0(Serial);
FastSerialPort2(serialGPS);
FastSerialPort1(serialIMU);
Encoder encoder(2,3);
void loop(){
Serial.println(readGPS(true));
Serial.println(readIMU());
@carlosdelfino
carlosdelfino / Cadeira_Inteligente.cpp
Last active June 3, 2020 17:11
Código para controle e segurança de uma Cadeira de Rodas Inteligente.
/*
Cadeira Inteligente
Código para controle de Cadeira de Rodas.
O Código lê o nível de sinal nas portas analógicas A0 e A1,
A0 indica se deve ir para frente ou para traz.
A1 indica se deve dar mais potência para Direita ou para Esquerda
Foram criadas algumas constantes, para facilitar o ajuste de valores para calibração do código.
anonymous
anonymous / string_problem
Created November 25, 2012 19:25
peace of file from aqua_control project
#include "Arduino.h"
#include "DallasTemperature.h"
#include "EtherCard.h"
#include "OneWire.h"
#include "Wire.h"
#include "DS1307new.h"
extern HardwareSerial Serial;
#define thermometerPin 4 //DS18B20 wired to Digital pin 2
@ronivaldo
ronivaldo / rpmLargeFont.ino
Created May 15, 2013 21:02
A set of custom made large numbers for a 16x2 LCD HD44780 Arduino Library
/*
A set of custom made large numbers for a 16x2 LCD using the
LiquidCrystal librabry. Works with displays compatible with the
Hitachi HD44780 driver.
The Cuicuit:
LCD RS pin to D12
LCD Enable pin to D11
LCD D4 pin to D5
LCD D5 pin to D4
@tarcieri
tarcieri / gist:6347417
Created August 26, 2013 22:27
djb on /dev/random vs /dev/urandom
Date: 17 Aug 2013 00:24:45 -0000
From: "D. J. Bernstein" <[email protected]>
To: [email protected]
Subject: Re: [cryptography] urandom vs random
Aaron Toponce writes:
> Cryptographers don't like the idea that it's possible, even if it's
> excessively remote, and highly unprobable. This is why you see suggestions
> to use /dev/random for long term SSH, SSL and OpenPGP keys.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); //RX, TX
//Ligando o Shield GSM SIM900.
int powerkey = 5;
int statuspin = 6;
int pinState = 0;
//Definindo Botao: