Skip to content

Instantly share code, notes, and snippets.

View kevinl95's full-sized avatar

Kevin kevinl95

View GitHub Profile
dialog (Result) {
match {
PasswordResult(this) {
from-output: generate(numWords)
}
}
template ("I generated a memorable, secure password for you using common english words:")
}
<layout mode="Details">
<match>
PasswordResult (r)
</match>
<content>
<layout-macro id="common:card">
<title>Your New Password</title>
<titleSize>large</titleSize>
<bodyText>{{r.Password}}</bodyText>
</layout-macro>
exports.handler = function( event, context ) {
var http = require( 'http' );
var url = 'http://api.openweathermap.org/data/2.5/weather?zip=<YOURZIPCODEHERE>,us&units=imperial&APPID=<YOURAPIKEYHERE>';
http.get( url, function( response ) {
var data = '';
@kevinl95
kevinl95 / feels like.js
Created November 25, 2018 22:05
How to calculate a 'Feels-Like' temperature using OpenWeatherMaps
var http = require( 'http' );
var url = 'http://api.openweathermap.org/data/2.5/weather?zip=<YOURZIP>,us&units=imperial&APPID=<YOURAPPID>';
http.get( url, function( response ) {
var data = '';
response.on( 'data', function( x ) { data += x; } );