Skip to content

Instantly share code, notes, and snippets.

// Enter your calendar ID below and service account JSON below
const calendarId = "<your_Calendar_ID>";
const serviceAccount = {
"type": "service_account",
"project_id": "your_JSON_ID",
"private_key_id": "your_JSON_ID",
"private_key": "your_JSON_ID-----END PRIVATE KEY-----\n",
"client_email": "your_JSON_ID",
"client_id": "your_JSON_ID",
{
  name: 'Oscar Barajas', 
  photo: '<URL_IMG>', 
  bio: 'Oscar Barajas Bio',
  jobTitle: 'Foundation Layer & Frontend Developer @Platzi',
  conferenceTitle: 'React y un mundo de posibilidades',
  description: 'Complete bio or description',
  social: [
    {name: 'twitter', url: 'twitter.com/gndx'},

{name: 'instagram', url: 'instagram.com/gndx'}

We couldn’t find that file to show.
We couldn’t find that file to show.
We couldn’t find that file to show.
@leoaiassistant
leoaiassistant / Funciones.js
Created July 25, 2019 20:25
Función para ejecutar respuestas matemáticas como la sumatoria, promedio, división, multiplicaión, entre otras a través de node.js para Actions on google & Dialogflow
function facturar (agent) {
let numerotickets = agent.parameters.ordentickets;
const precio = 20;
for (let i = 0; i < agent.parameters.ordentickets.lenght; i++)
{
numerotickets += agent.parameters.ordentickets[1].number;
}
let total = precio * numerotickets;
@leoaiassistant
leoaiassistant / iata.csv
Created July 25, 2019 20:09
+3500 códigos iata de aeropuertos internacionales para entrenamiento de modelo NLP.
Aalborg, Denmark AAL
Aalesund, Norway AES
Aarhus, Denmark - Bus service ZID
Aarhus, Denmark - Tirstrup AAR
Aasiaat, Greenland JEG
Abadan, Iran ABD
Abakan, Russia ABA
Abbotsford, BC YXX
Aberdeen, SD ABR
Aberdeen, United Kingdom ABZ
@leoaiassistant
leoaiassistant / index.js
Created July 25, 2019 00:11
Integration of Fulfillment with Firestore in Nodejs
'use strict';
const functions = require('firebase-functions');
const admin = require('firebase-admin');
const {WebhookClient} = require('dialogflow-fulfillment');
process.env.DEBUG = 'dialogflow:*'; // enables lib debugging statements
admin.initializeApp(functions.config().firebase);
const db = admin.firestore();
@leoaiassistant
leoaiassistant / ChatBanking.js
Last active July 24, 2019 19:48
Mobile banking through popular apps is a chatbot intended to be utilized by banks to give services to their customers. A customer will be able to sign up to the bot via facebook.com and use services as Query account balance Set alert transactions Notifications based on purchase amounts etc.
'use strict';
import {} from 'dotenv/config'
const
bodyParser = require('body-parser'),
express = require('express'),
request = require('request'),
httpStatus = require('http-status'),
morgan = require('morgan'),
cluster = require('cluster');