Skip to content

Instantly share code, notes, and snippets.

View jeroavf's full-sized avatar

Jeronimo Avelar Filho jeroavf

View GitHub Profile
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.rotateCannon(360);
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
http://www.dell.com/br/p/deals?c=br&l=pt&cs=brdhs1&s=dhs&ref=hp1
http://shop.lenovo.com/br/pt/laptops/thinkpad/edge-series/e431/?menu-id=s%C3%A9rie_e
http://shop.lenovo.com/br/pt/laptops/lenovo/g-series/g40/
@jeroavf
jeroavf / esp8266-esp01-relay-web-mqtt.ino
Last active April 18, 2024 16:57 — forked from murilopontes/esp8266-esp01-relay-web-mqtt.ino
ESP8266 ESP-01 relay control using Web server or MQTT
#include <PubSubClient.h>
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
const char* wifi_ssid = "XXXXX";
const char* wifi_password = "XXXXX";
char* mqtt_server = "iot.eclipse.org";
char* mqtt_user = "";
@jeroavf
jeroavf / Dockerfile
Created October 6, 2015 15:49 — forked from thom-nic/Dockerfile
Dockerfile that attempts to run the app as non-root user. This creates a `node` user & sets permissions on app files. Note you cannot `chown` files in a docker 'volume' during the build process, but you can at runtime (as part of your `CMD`) but in that case you can't use the `USER` command to change the UID before `CMD` runs.
###
# Node.js app Docker file
#
# Some basic build instructions:
# ```
# # you should delete node_modules b/c you don't want that copied during 'ADD'
# docker build -t thom-nic/node-bootstrap .
# # run a shell in the container to inspect the environment (as root):
# docker run --rm -itu root thom-nic/node-bootstrap /bin/bash
# ```
@jeroavf
jeroavf / gist:08c6b6cb671d06a93a3b
Created November 6, 2015 11:52
Testes de Espetaculo PM87
@Test(expected = IllegalArgumentException.class)
public void naoDeveriaCriarSessoesDiariasQuandoDataInicioMaiorQueDataFim() {
//DADAS ESTAS ENTRADAS:
LocalDate hoje = new LocalDate();
LocalDate amanha = hoje.plusDays(1);
LocalTime agora = new LocalTime();
Periodicidade diaria = Periodicidade.DIARIA;
//QUANDO EU DISPARAR O PROCESSAMENTO:
Espetaculo show = new Espetaculo();
@jeroavf
jeroavf / vm-resize-hard-disk.md
Created November 11, 2015 12:32 — forked from christopher-hopper/vm-resize-hard-disk.md
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

/*
ESP8266 + DHT + MQTT
- Teste inicial de conexão de um DHT22 a um ESP8266
- Esta versão apenas envia dados pela porta Serial
Falta Corrigir
- connection to an MQTT server
- subscription to the topic "casa/escritorio/sensor"
*/
@jeroavf
jeroavf / Flexbox.html
Created December 10, 2015 19:06
Flexbox.html
<!DOCTYPE html>
<html>
<head>
<title>Mirror Fashion</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="css/reset.css" />
<style>
.menu-opcoes li {