Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am guidone on github.
  • I am guidone (https://keybase.io/guidone) on keybase.
  • I have a public key whose fingerprint is 072D 16E8 EC3C DDA3 2683 B558 52AB C491 A320 AC4C

To claim this, I am signing this object:

196520947 [Guido Bellomo] > Wed Oct 05 2016 12:08:45 GMT+0000 - /start
196520947 [Guido Bellomo] < Wed Oct 05 2016 12:08:45 GMT+0000 - Hi, this is GuidoneBot, here's what I can do for you:/help - you're already seeing this/where - tells where's Guido's house/cv - to get an updated CV (via email)/cam - pry into Guido's living room/message - send a high priority message to Guido/home - check if Guido is at home
196520947 [Guido Bellomo] > Wed Oct 05 2016 12:11:23 GMT+0000 - Come ti chiami?
196520947 [Guido Bellomo] > Wed Oct 05 2016 12:11:23 GMT+0000 - Sorry, I'm can only speak English
// get the chat context
var chat = msg.chat();
// email payload
msg.to = chat.get('email');
@guidone
guidone / netatmo_dashboad.json
Last active April 10, 2017 12:10
NetAtmoDashboard payload
{
"temperature": 27.5,
"co2": 246,
"humidity": 60,
"noise": 38,
"pressure": 1009.5,
"pressureTrend": "stable",
"externalTemperature": 30,
"externalHumidity": 51,
"externalTemperatureTrend": "stable"
@guidone
guidone / express-1.js
Created April 10, 2017 15:18
Express Middleware 1
app.get('/mypage', function(req, res, next) {
sequelize.search(query1)
.on('success', function(res_query1) {
sequelize.search(query2)
.on('success',function(res_query2) {
res.render('my_template', {
query1: res_query1,
query2: res_query2
});
});
@guidone
guidone / express-middleware-2.js
Created April 10, 2017 15:23
Express Middleware 2
app.get('/mypage',
function(req, res, next) {
sequelize.search(query1)
  .on('success', function(res_query1) {
  req.query1 = res_query1;
  return next();
  });
  },
  function(req, res, next) {
  sequelize.search(query2)
@guidone
guidone / express-middleware-3.js
Created April 10, 2017 15:26
Express Middleware 3
app.get('/mypage/ajax',
mw_1,
  function(req, res, next) {
  res.render('my_subtemplate', {
  query1: req.query1
  });
  }
);
@guidone
guidone / poller.js
Created April 11, 2017 07:50
Poller
var poller = new Poller();
poller.intervals([1000, 5000, 10000])
.checkback(function(callback) {
  // could be anything asynchronous
  $.getJSON('/is/server/ready', function(response) {
  if (response.ready) {
  callback(true);
} else {
  else callback(false);
  }
const { Button, Paragraph } = RSuite;
const MyPage = () => {
return (
<div>
<br />
Bella page
const { Button, Placeholder } = RSuite;
const MyPage = () => {
return (
<div>
<br />
Bella page
<br />