Skip to content

Instantly share code, notes, and snippets.

@muttoni
muttoni / .bash_profile
Created June 19, 2017 11:20 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
'use strict';
var Alexa = require("alexa-sdk");
var languageStrings = {
'en-GB': {
'translation': {
'DEFAULT' : '<say-as interpret-as="interjection">uh-huh</say-as>',
'WELCOME' : "Hello there, tell me what's on your mind. I'm a great listener.",
'HELP' : "I love to listen! Just keep talking to me and I'll occasionally show my enthusiasm",
const Alexa = require('alexa-sdk');
const moment = require('moment');
const languageStrings = {
'en-GB': {
'translation': {
'WELCOME_MESSAGE' : 'Hello World!',
'LAST_HAIRCUT' : 'Your last haircut was %s',
'HAIRCUT_SAVED_SUCCESSFULLY' : "Ok, I'll remember this haircut",
'UNHANDLED' : "I'm sorry, I didn't catch that. What would you like to do?",
/* IMPORTANT COPYRIGHT: Shaquilla Johnson - DO NOT COPY IDEA */
// 1. Text strings =====================================================================================================
// Modify these strings and messages to change the behavior of your Lambda function
// SEE BOTTOM FOR INTERACTION MODEL
var speechOutput;
var reprompt;
// 2. Skill Code =======================================================================================================
/* This code has been generated from your interaction model
/* eslint-disable func-names */
/* eslint quote-props: ["error", "consistent"]*/
// There are three sections, Text Strings, Skill Code, and Helper Function(s).
// You can copy and paste the contents as the code for a new Lambda function, using the alexa-skill-kit-sdk-factskill template.
// This code includes helper functions for compatibility with versions of the SDK prior to 1.0.9, which includes the dialog directives.
@muttoni
muttoni / supports-display.js
Created November 15, 2017 10:46
Check if Alexa requests supports Render Templates
function supportsDisplay() {
var hasDisplay =
this.event.context &&
this.event.context.System &&
this.event.context.System.device &&
this.event.context.System.device.supportedInterfaces &&
this.event.context.System.device.supportedInterfaces.Display
return hasDisplay;
}
{
"languageModel": {
"types": [
{
"name": "RANDOM",
"values": [
{
"id": null,
"name": {
"value": "to be honest",
@muttoni
muttoni / index.js
Created January 15, 2018 14:57
Math Helper
/* This code has been generated from your interaction model
/* eslint-disable func-names */
/* eslint quote-props: ["error", "consistent"]*/
// There are three sections, Text Strings, Skill Code, and Helper Function(s).
// You can copy and paste the contents as the code for a new Lambda function, using the alexa-skill-kit-sdk-factskill template.
// This code includes helper functions for compatibility with versions of the SDK prior to 1.0.9, which includes the dialog directives.
@muttoni
muttoni / index.js
Last active February 5, 2018 14:36
Dog Translator Sample Skill
//LAMBDA CODE!
/* This code has been generated from your interaction model
/* eslint-disable func-names */
/* eslint quote-props: ["error", "consistent"]*/
// There are three sections, Text Strings, Skill Code, and Helper Function(s).
// You can copy and paste the contents as the code for a new Lambda function, using the alexa-skill-kit-sdk-factskill template.
// This code includes helper functions for compatibility with versions of the SDK prior to 1.0.9, which includes the dialog directives.
@muttoni
muttoni / guitar-tuner.js
Created April 18, 2018 15:24
The lambda code to the Guitar Tuner skill we are building
/* This code has been generated from your interaction model
/* eslint-disable func-names */
/* eslint quote-props: ["error", "consistent"]*/
// There are three sections, Text Strings, Skill Code, and Helper Function(s).
// You can copy and paste the contents as the code for a new Lambda function, using the alexa-skill-kit-sdk-factskill template.
// This code includes helper functions for compatibility with versions of the SDK prior to 1.0.9, which includes the dialog directives.