Skip to content

Instantly share code, notes, and snippets.

AJ Alves zerokol

Block or report user

Report or block zerokol

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zerokol
zerokol / temp-fuzzy.ino
Created Nov 19, 2012
Temperature example with Fuzzy avaliation
View temp-fuzzy.ino
#include <FuzzyRule.h>
#include <FuzzyComposition.h>
#include <Fuzzy.h>
#include <FuzzyRuleConsequent.h>
#include <FuzzyOutput.h>
#include <FuzzyInput.h>
#include <FuzzyIO.h>
#include <FuzzySet.h>
#include <FuzzyRuleAntecedent.h>
View megasena.rb
# rand generate 6 numbers in range of 1 to 60, and print ordered
(1..60).sort_by{ rand }[1..6].sort
@zerokol
zerokol / font-awesome-overwrite.scss
Last active Jan 18, 2019
Font Awesome overwrite to set the correct font path in Ruby On Rails and work in Production
View font-awesome-overwrite.scss
/*!
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/
@import "font-awesome/scss/variables";
/* FONT PATH VARIABLE
* -------------------------- */
$fa-font-path: "font-awesome/fonts/";
/* -------------------------- */
@zerokol
zerokol / zerokol.com
Created Jul 6, 2018
Simple NGINX setup to serve a static site
View zerokol.com
# redirect www to @
server {
server_name www.zerokol.com;
rewrite ^(.*) http://zerokol.com$1 permanent;
}
server {
listen 80;
server_name zerokol.com;
server_tokens off;
@zerokol
zerokol / reed-switch-test.ino
Last active Aug 9, 2018
Conecting a Reed Switch with Arduino
View reed-switch-test.ino
/*
* AJ Alves (aj.alves@zerokol.com)
*/
const int REED_SWITCH_PIN = 3; // Reed Switch Pin
void setup() {
Serial.begin(9600); // Init serial 9600
pinMode(REED_SWITCH_PIN, INPUT); // Set pin as INPUT
}
@zerokol
zerokol / nrf24l01-transmissor-test.ino
Created Aug 9, 2018
Code to test nRF24L01 with Arduino (Transmisso)
View nrf24l01-transmissor-test.ino
/*
* AJ Alves (aj.alves@zerokol.com)
*/
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
// Instantiate RF24 class with CE and CSN values
RF24 radio(9, 10);
@zerokol
zerokol / nrf24l01-receiver-test.ino
Last active Aug 9, 2018
Code to test nRF24L01 with Arduino (Receiver)
View nrf24l01-receiver-test.ino
/*
* AJ Alves (aj.alves@zerokol.com)
*/
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
// Instantiate RF24 class with CE and CSN values
RF24 radio(9, 10);
@zerokol
zerokol / test_nrf24l01_nodemcu_receiver.ino
Created Aug 12, 2018
To test NodeMCU as a receiver, conected with nRF24L01
View test_nrf24l01_nodemcu_receiver.ino
/*
* AJ Alves (aj.alves@zerokol.com)
*/
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
// Instantiate RF24 class with CE and CSN values
RF24 radio(2, 15);
View Pessoa.h
/*
Definição da classe Pessoa: Pessoa.h
*/
#ifndef PESSOA_H
#define PESSOA_H
#include "string"
using std::string;
class Pessoa
View Pessoa.cpp
/*
Implementação da classe Pessoa: Pessoa.cpp
*/
#include "Pessoa.h"
Pessoa::Pessoa(){};
void Pessoa::setNome(string nome)
{
You can’t perform that action at this time.