Skip to content

Instantly share code, notes, and snippets.

View Nullpo's full-sized avatar

Pablo Nullpo

  • Argentina
View GitHub Profile
@Nullpo
Nullpo / ingredientesPeg.peg
Last active January 25, 2020 17:17
Gramatica recetapp
Ejemplo:
nombre: pescado
cantidad: 2 gramos
grasas: 10
calorias: 10
carbohidratos: 20
proteinas: 10.3
@Nullpo
Nullpo / Bla.sql
Created August 18, 2017 17:17
Cristina ganó el provisorio
Query:
SELECT n.parDenominacion, sum(m.votVotosPartido)
FROM MesasCandidaturaSNacionales m, nomPartidos n
WHERE m.vot_proCodigoProvincia = '02' AND
n.parCodigo = m.vot_parCodigo
group by m.vot_parCodigo, n.parDenominacion
Resultados:
//18/11/2015
// KITROBOT
// DAniel N. Esquerdo
// Controlador robot Rover Micro RM3 version 0_1
// Sensores : Bumper derecho e izquierdo
// Sensor de distancia ultrasonico modelo HC-SR04
// Servos : 2
@Nullpo
Nullpo / lineal.js
Created December 2, 2015 20:36
obtener funcion lineal a partir de dos puntos.
var Punto = function(x,y){
return { x: x, y: y };
}
function obtenerRecta(p1, p2){
var x1 = p1.y;
var y1 = p1.y;
var x2 = p2.x;
var y2 = p2.y;
@Nullpo
Nullpo / app.js
Created November 19, 2015 14:28
Distancia entre puntos en 3d!
var array = [{
x: 1,
y: 1,
z: 1
},{
x: 50,
y: 1,
z: 1
},{
x: 1,
@Nullpo
Nullpo / _findInTree.js
Last active November 6, 2015 15:13
Find & return node in a tree (maybe in a functional way)
const findInTree =
(fnEquals) => (id, node) =>
fnEquals(node,id) || node.childs.reduce(
(prev, elem) => prev || findInTree(equals)(id, elem), null
);
@Nullpo
Nullpo / promises.md
Last active August 29, 2015 14:26 — forked from domenic/promises.md
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@Nullpo
Nullpo / votar.js
Created July 6, 2015 14:55
Vot.Ar - CABA 2015 -> bajar votos publicos
// Scriptcito para bajarse los datos publicos que se hallan en https://www.2015elecciones.gob.ar/
var request = require("request");
var assert = require('assert');
var MongoClient = require('mongodb').MongoClient;
var mesas = 9044;
var Utils = {
@Nullpo
Nullpo / application.js
Last active August 29, 2015 14:21
scout.promises
//Client code
var socket = io.connect('http://localhost:3000');
var sock = new Scout(socket, "jquery", $);
var params = {
time:1000,
message:"Timeouteaste"
};

TODO: English version... sorry!

Micro-gramatica para recetas (v0.1)

La idea de esta gramatica formal es estandarizar la definicion de recetas, para que sea facil a una computadora "entender" los requisitos para la misma.

El proyecto està muuuy verde, y por ahora divide los ingredientes, de los pasos a realizar. En siguientes versiones se agregaran: