Skip to content

Instantly share code, notes, and snippets.

View luisleao's full-sized avatar

Luís Leão luisleao

View GitHub Profile
{
"description": "Dialogflow Connector",
"states": [
{
"name": "Trigger",
"type": "trigger",
"transitions": [
{
"event": "incomingMessage"
},
@luisleao
luisleao / functions.js
Created April 5, 2017 02:56
Google Assistant Sample
/**
* Endpoint which handles requests for a Google Assistant action which asks users to say a number
* and read out the ordinal of that number.
* e.g. If the user says "Twelve" the action will say "The ordinal of twelve is twelfth".
*/
exports.raffleUser = functions.https.onRequest((req, res) => {
const assistant = new ActionsSdkAssistant({request: req, response: res});
// List of re-prompts that are used when we did not understand a number from the user.
@luisleao
luisleao / createPDF.gs
Created October 19, 2016 15:26 — forked from andrewroberts/createPDF.gs
This is a Google Apps Script that creates a PDF file using a Google Doc template and the values in a Google Spreadsheet. More details can be found at www.andrewroberts.net/2014/10/google-apps-script-create-pdf/
// Replace this with ID of your template document.
var TEMPLATE_ID = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx'
// var TEMPLATE_ID = '1wtGEp27HNEVwImeh2as7bRNw-tO4HkwPGcAsTrSNTPc' // Demo template
// Demo script - http://bit.ly/createPDF
// You can specify a name for the new PDF file here, or leave empty to use the
// name of the template.
var PDF_FILE_NAME = ''
@luisleao
luisleao / createPDF.gs
Created October 19, 2016 15:26 — forked from andrewroberts/createPDF.gs
This is a Google Apps Script that creates a PDF file using a Google Doc template and the values in a Google Spreadsheet. More details can be found at www.andrewroberts.net/2014/10/google-apps-script-create-pdf/
// Replace this with ID of your template document.
var TEMPLATE_ID = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx'
// var TEMPLATE_ID = '1wtGEp27HNEVwImeh2as7bRNw-tO4HkwPGcAsTrSNTPc' // Demo template
// Demo script - http://bit.ly/createPDF
// You can specify a name for the new PDF file here, or leave empty to use the
// name of the template.
var PDF_FILE_NAME = ''
/*
SK8Led
*/
//pins
int pins[] = {2,3,4};
//{red, green, blue}
int configPins[] = {8,9,11,12};
//{varUpPin, varDownPin, valueUpPin, valueDownPin}
@luisleao
luisleao / Xbox_live_Traffic_Lights
Created October 18, 2012 14:25 — forked from anonymous/Xbox_live_Traffic_Lights
Xbox Live Traffic Lights code for Arduino
/*
*** Xbox Live online users to traffic lights ***
created 26 July 2012
by Andrew D. Farquharson
- Every 5 mins program will check who is online, and turn a red, orange or green light
depending on how meany people are online.
- This uses the Text Finder Librarys @ http://www.arduino.cc/playground/Code/TextFinder