Skip to content

Instantly share code, notes, and snippets.

@mlopezr
mlopezr / videoPlayer-apl1.1-v02.json
Created November 5, 2019 10:55
VideoPlayer with auto-hiding overlay in APL 1.1
{
"type": "APL",
"version": "1.1",
"import": [
{
"name": "alexa-layouts",
"version": "1.1.0"
}
],
"mainTemplate": {
@mlopezr
mlopezr / responsive-splash-screen.json
Last active August 27, 2019 09:32
Responsive APL Splash Screen with logo and hint
{
"document": {
"type": "APL",
"version": "1.0",
"theme": "dark",
"import": [],
"resources": [],
"styles": {},
"layouts": {
"ResponsiveSplashLayout": {
@mlopezr
mlopezr / full-response-with-commands.json
Last active January 18, 2019 10:40
Sample Spoken Horizontal List
{
"directives": [
{
"type": "Alexa.Presentation.APL.RenderDocument",
"token": "intro",
"document": {
"type": "APL",
"version": "1.0",
"theme": "dark",
"import": [],
@mlopezr
mlopezr / Sample question component for quiz skill using APL.md
Last active August 2, 2019 13:12
Sample APL for quiz skill: pager with result of last question and next question

Sample question component for quiz skill using APL

This is a sample APL for a quiz result and question.

It includes both the APL document and sample data sources.

Tweak it

@mlopezr
mlopezr / server.js
Last active March 13, 2019 21:52
Sample server to run Alexa skill on your machine, to be used with ngrok
const express = require('express');
const bodyParser = require('body-parser');
const handler = require('./index').handler;
function CreateHandler(handler) {
return (req, res) => {
handler(req.body, null, (err, result) => {
if (err) {
return res.status(500).send(err);
@mlopezr
mlopezr / README.md
Last active March 14, 2019 14:11
Running Alexa skills from your local machine

Running Alexa skills from your local machine

Talk to Alexa skills running on your local machine. Stop waiting for Lambda deployments. Debug step-by-step.

Setup

  • Find the index.js file containing your ASK SDK NodeJS skill handler code (usually in skill-name/lambda/custom)
  • Add server.js to the same folder where index.js is located
@mlopezr
mlopezr / README.md
Last active November 19, 2017 10:04
Scrape Alexa Skills Kit Documentation to eBook

Keybase proof

I hereby claim:

  • I am mlopezr on github.
  • I am mariolr (https://keybase.io/mariolr) on keybase.
  • I have a public key whose fingerprint is 350A ECC7 9149 45E6 8757 04A0 8353 BB07 494E 7074

To claim this, I am signing this object:

@mlopezr
mlopezr / cryptpad-dockerfile
Created October 5, 2016 12:16
Dockerfile for cryptpad that works behind port forwarding
FROM node:6
# Should run as non-root user but currently can't make it to work behind a reverse proxy. Alternatives are:
# 1) Change source to show a different websocket port than the one listened: https://github.com/xwiki-labs/cryptpad/issues/42
# 2) Tweak reverse proxy to rewrite GET /api/config responses
# 3) Expose server on port 80 within Docker container <-- simplest approach selected
# Create directories
RUN mkdir /data \
&& mkdir -p /usr/src/app \
@mlopezr
mlopezr / zapier-matrix.js
Created September 6, 2016 23:52
Zapier script to integrate with matrix.org chatrooms
'use strict';
var Zap = {
get_session_info: function(bundle) {
/*
Argument:
bundle.request.url: <string>
bundle.request.headers: <object>
bundle.request.params: <object> # this will be mapped into the querystring