Skip to content

Instantly share code, notes, and snippets.

View ivanseidel's full-sized avatar
undefined is not defined

Ivan Seidel ivanseidel

undefined is not defined
View GitHub Profile
@ivanseidel
ivanseidel / estufa_v1.ino
Created April 8, 2014 02:56
Temperature PID controller for Arduino
// Nossas Bibliotecas
#include "Thread.h"
#include "ThreadController.h"
#include "LinkedList.h"
#include "Gaussian.h"
#include "GaussianAverage.h"
// Bibliotecas externas
#include "TimerOne.h"
@ivanseidel
ivanseidel / belongsToMany.js
Last active August 29, 2015 14:05
GeddyJs belongsToMany with Array helper
/*
* GeddyJs belongsToMany helper module
* Ivan Seidel Gomes (ivanseidel@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@ivanseidel
ivanseidel / avoidRobot.pde
Created April 14, 2015 20:41
Processing Game: Avoid the Robot!
class Robo{
Vetor position;
Vetor direction;
Robo(double x, double y){
position = new Vetor(x, y);
direction = fromTheta(Math.PI/4);
}
public void mover(double passos){
@ivanseidel
ivanseidel / robotSimulation.pde
Created April 17, 2015 20:22
Simple Robot Simulation with Interface
interface QuandoPrecisaExecutar{
public void executar(Robo eeew);
}
class Robo{
Vetor position;
Vetor direction;
Robo(double x, double y){
position = new Vetor(x, y);
@ivanseidel
ivanseidel / robotSimulationHit.pde
Created April 17, 2015 21:10
Processing Robot Hit Simulator
interface QuandoPrecisaExecutar{
public void executar(Robo eeew);
}
// http://bit.ly/1FSZBkP
class Robo{
Vetor position;
Vetor direction;
@ivanseidel
ivanseidel / page-transition.js
Last active July 3, 2016 09:51
Animation and Transition Controller for CSS3
/*
Copyright 2014 Ivan Seidel
Light controll for animations and transitions
When animating 'fromElement' to 'toElement', with options:
$.transition(toElement, fromElement, options);
$.transition(toElement, options);
$.transition(toElement);
@ivanseidel
ivanseidel / JohnnyWithDrive.js
Last active August 9, 2016 18:10
Sends data to Google Drive with Johnny-five and request
var five = require('johnny-five');
var request = require('request');
var url = 'https://script.google.com/macros/s/YOUR-APP-ID-HERE/exec';
var board = new five.Board();
board.on("ready", function() {
var sensor = new five.Pin("A0");
// Faz leitura unica e loga o valor
@ivanseidel
ivanseidel / index.js
Created December 16, 2014 22:44
Vivo Internet Router Password Breaker
/*
Vivo Routers use as default, a 4 digit Hexadecimal password (like 'A8DB', '123F'...)
This is a simple script to try lots of them, and find out the right one.
Developed by ivanseidel, github.com/ivanseidel
*/
var request = require('request');
var async = require('async');
@ivanseidel
ivanseidel / test.js
Last active February 18, 2017 13:47
Redux's benchmarks
//
// Created by Ivan Seidel, Feb/2017
//
// This is a efficiency comparision on state manipulation of arrays
// using ~push~ and ~spread~ operator.
//
// Reason why I did this:
// while getting in sync with current JS/Nodejs tools around the web,
// I got myself digging into Redux's example codes and good practices.
// One of those, was to always use pure functions. Always re-create
@ivanseidel
ivanseidel / restart.js
Created March 9, 2017 14:00
DraftLog cool examples
const async = require('async')
const chalk = require('chalk')
const TAG = chalk.green('[PM2]')
require('draftlog').into(console)
/*
* Statuses is an array of each server status.
*/