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
@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 / gist:711990
Created November 23, 2010 16:02
Exemplo de codigo para abrir nova URL conforme um id inserido.
<html>
<head>
</head>
<body>
<form onsubmit="return false;">
<input id="textfield" value="0001" onchange="
var value = this.value;
if(value){
confirm('Abrindo URL para Cliente: '+value);
var finalurl = 'https://minhaurl.com.br/cadastro.php?cda='+value;
<?php
require_once "lib/spyc.php";
$obj = Spyc::YAMLLoad('videos.yml');
//print_r($obj);
foreach($obj as $grupo){
echo "<h1>".$grupo['video']."</h1>";
echo "<h3><strong>Arquivo:</strong>".$grupo['arquivo']."</h2>";
echo "<p>".$grupo['descricao']."</p>";
@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 / gist:923532
Created April 16, 2011 21:49
Um exemplo usando perl para solucionar o problema da impressãp
#!/usr/bin/perl -w
use strict;
use IO::Socket;
my ($host, $port, $kidpid, $handle, $line);
unless (@ARGV == 2) { die "usage: $0 host port" }
($host, $port) = @ARGV;
# create a tcp connection to the specified host and port
$handle = IO::Socket::INET->new(Proto => "tcp",
<?php
/*
Sistema: Sistema
Finalidade: Classe para conexão com o banco de dados (postgresql ou mysql).
Autor: Wanderson Ferreira Dias
Observacao:
Alteracoes:
Nro Data Autor - Alteracao
--- -------- -------------------------------------------------------------------
001 20.05.06 Wanderson - 1º versão do programa
@carlosdelfino
carlosdelfino / gist:2473612
Created April 23, 2012 20:28 — forked from fnando/gist:2420869
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 / Result
Created July 18, 2012 18:10
Generate a String to Maple
This is OK!!
This is OK!!
This is OK!!
This is OK!!
This is OK!!
// We'll use timers 3 and 4
HardwareTimer timer3(3);
HardwareTimer timer4(4);
void setup() {
// Pause the timer while we're configuring it