Skip to content

Instantly share code, notes, and snippets.

View estebanrfp's full-sized avatar
🎯
learning ...

Esteban Fuster Pozzi estebanrfp

🎯
learning ...
View GitHub Profile
@estebanrfp
estebanrfp / index.html
Created April 5, 2018 23:40 — forked from giodamelio/index.html
IPFS Simple Static Site
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hello IPFS!</title>
<link rel="stylesheet" href="./style.css" />
</head>
<body>
<h1>Hello IPFS!</h1>
</body>
@estebanrfp
estebanrfp / IndexedDB101.js
Created March 23, 2018 00:33 — forked from JamesMessinger/IndexedDB101.js
Very Simple IndexedDB Example
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
// Open (or create) the database
var open = indexedDB.open("MyDatabase", 1);
// Create the schema
open.onupgradeneeded = function() {
var db = open.result;
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"});
@estebanrfp
estebanrfp / IndexedDB101.js
Created March 23, 2018 00:33 — forked from JamesMessinger/IndexedDB101.js
Very Simple IndexedDB Example
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
// Open (or create) the database
var open = indexedDB.open("MyDatabase", 1);
// Create the schema
open.onupgradeneeded = function() {
var db = open.result;
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"});
@estebanrfp
estebanrfp / listening-client.js
Created January 4, 2018 10:21 — forked from johnnyman727/listening-client.js
Simple MQTT Server. Tessel acts as an MQTT client sending temperature data to a host
var mqtt = require('mqtt')
// Make sure to change this to the IP address of your MQTT server
, host = '192.168.128.204' // or localhost
client = mqtt.createClient(1883, host, {keepalive: 10000});
// Subscribe to the temperature topic
client.subscribe('temperature');
// When a temperature is published, it will show up here
client.on('message', function (topic, message) {
@estebanrfp
estebanrfp / MongoDbHelper.js
Created May 25, 2016 00:11 — forked from k33g/MongoDbHelper.js
Playing with node-mongodb-native and ECMAScript 6 and Express
/**
* Created by k33g_org on 24/10/14.
*/
import mongodb from 'mongodb';
import uuid from 'node-uuid';
/*
http://mongodb.github.io/node-mongodb-native/2.0/tutorials/crud_operations/
*/