Skip to content

Instantly share code, notes, and snippets.

View carlosdelfino's full-sized avatar
💭
Estudando Salesforce e seu ecosistema

Carlos Delfino carlosdelfino

💭
Estudando Salesforce e seu ecosistema
View GitHub Profile
#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:
@carlosdelfino
carlosdelfino / RTgoertzelFilter.c
Created July 31, 2014 03:52
analisando o uso do Algoritimo Goertzel, as anotações aqui presentes são para uso no artigo referente ao uso do Algortimo com Arduino. todos foram obtidos no link: http://netwerkt.wordpress.com/2011/08/25/goertzel-filter/
double RTgoertzelFilter(int sample, double freq) {
static double s_prev = 0.0;
static double s_prev2 = 0.0;
static double totalpower = 0.0;
static int N = 0;
double coeff,normalizedfreq,power,s;
normalizedfreq = freq / SAMPLEFREQUENCY;
coeff = 2*cos(2*M_PI*normalizedfreq);
s = sample + coeff * s_prev - s_prev2;
s_prev2 = s_prev;
@carlosdelfino
carlosdelfino / bitly.rb
Last active August 29, 2015 14:27 — forked from jalcine/bitly.rb
An Octopress / Jekyll plugin to provide a tag that automatically generates a bit.ly short-link for the current page in reference.
##
## @author Jacky Alcine <me@jalcine.me>
## @see [TODO: Add URL to post about bit.ly URLs.]
##
## Add in Bit.ly URL support to pages.
require "bitly"
# Ensure use of new API.
Bitly.use_api_version_3
@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);
@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;
@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());
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
@carlosdelfino
carlosdelfino / Readme.md
Last active April 13, 2019 16:51 — forked from mheadd/fastagi.js
Node.js script to execute FastAGI application

Launch the node TCP server for FastAGI:

~$ node path/to/fastagi.js

Add a context for FastAGI testing:

[fastagi-test]
@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" <djb@cr.yp.to>
To: cryptography@randombit.net
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.
@nilsmehlhorn
nilsmehlhorn / AndroidManifest.xml
Last active November 16, 2019 13:46
Android push notifications with EddyVerbruggen/nativescript-plugin-firebase
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="__PACKAGE__"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"