Skip to content

Instantly share code, notes, and snippets.

View ryanlowdermilk's full-sized avatar
💭
I may be slow to respond.

Ryan Lowdermilk ryanlowdermilk

💭
I may be slow to respond.
  • Microsoft
  • Dallas, TX
View GitHub Profile
@ryanlowdermilk
ryanlowdermilk / index.js
Created May 29, 2019 22:01
A simple example of an Alexa Music Skill
const Alexa = require('ask-sdk-core');
exports.handler = (event, context, callback) => {
console.log(`event: ${JSON.stringify(event)}`);
var jsonStr = null;
if (event.header !== undefined && event.header.name == "GetPlayableContent") {
jsonStr = `{
"header": {
"messageId": "00ef1e9a-140b-485c-bc2c-5b9556cee492",
"namespace": "Alexa.Media.Search",
var customer = new Customer { Name="Joe Bloggs", Age=31 };
var json = JsonSerializer.SerializeToString(customer);
var fromJson = JsonSerializer.DeserializeFromString<Customer>(json);
Get["/idea/{id}"] = parameters =>
{
using (var db = new IdeastrikeContext())
{
int id = parameters.id;
var idea = db.Ideas.Where(i => i.Id == id).FirstOrDefault();
return string.Format("Id: {0}, Title: {1} Description: {2}", idea.Id, idea.Title, idea.Description);
}
};
/user/{id}
/user/create
/user/{id}/delete
/user/{id}/update
/idea/{id}
/idea/create
/idea/{id}/delete
/idea/{id}/update
using System.Collections.Generic;
using Jabbot.CommandSprockets;
namespace WeatherSprocket
{
public class WeatherSprocket : CommandSprocket
{
public override IEnumerable<string> SupportedInitiators
{
get { yield return "weather"; }
@ryanlowdermilk
ryanlowdermilk / index.html
Created January 10, 2012 22:31
windows phone dev podcast - HTML5 + jQueryMobile + PhoneGap
<!DOCTYPE html>
<html>
<head>
<title>Home</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
<script src="json2.js"></script>
<script>