Skip to content

Instantly share code, notes, and snippets.

View runtimeZero's full-sized avatar
🎯
Focusing

@runtimeZero runtimeZero

🎯
Focusing
View GitHub Profile
@runtimeZero
runtimeZero / HighLow.js
Created January 10, 2018 19:49
Alexa Skill - High Low
'use strict';
const Alexa = require("alexa-sdk");
const appId = 'amzn1.ask.skill.78e25d07-06c9-488b-afc1-9dabeae510bc'; //'amzn1.echo-sdk-ams.app.your-skill-id';
exports.handler = function(event, context, callback) {
const alexa = Alexa.handler(event, context);
alexa.appId = appId;
alexa.registerHandlers(newSessionHandler, startGameHandlers, guessGameHandlers, guessAttemptHandlers);
alexa.execute();
};
@runtimeZero
runtimeZero / PlanMyTrip.js
Created January 10, 2018 01:46
PlanMyTrip - with sdk
const Alexa = require('alexa-sdk');
const APP_ID = 'amzn1.ask.skill.be810433-aaae-4cd3-99fc-708e3047a807';
exports.handler = (event, context, callback) => {
const alexa = Alexa.handler(event, context);
alexa.appId = APP_ID;
alexa.registerHandlers(handlers);
alexa.execute();
};
// Give the service worker access to Firebase Messaging.
// Note that you can only use Firebase Messaging here, other Firebase libraries
// are not available in the service worker.
importScripts('https://www.gstatic.com/firebasejs/3.9.0/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/3.9.0/firebase-messaging.js');
// Initialize the Firebase app in the service worker by passing in the
// messagingSenderId.
var config = {
@runtimeZero
runtimeZero / favorites.html
Created August 31, 2017 15:28
Template for favorites
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="image-container">
<app-post *ngFor="let imageData of favoritesList"
[imageName]="imageData.name"
[displayFavoritesButton]="false"
>
</app-post>
@runtimeZero
runtimeZero / following.html
Created August 31, 2017 14:58
template for following
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="image-container">
<app-post *ngFor="let post of postList"
[imageName]="post.data.name"
[displayFollowButton]="false"
[displayFavoritesButton]="false"
></app-post>
@runtimeZero
runtimeZero / all-post.html
Created August 31, 2017 03:26
template for all-post.html
<div class="container">
<div class="row">
<div class="col-lg-12 text-left">
<button class="btn btn-primary" (click)="onLoadMore()">Load More Images</button>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="image-container">
@runtimeZero
runtimeZero / post.html
Created August 31, 2017 02:03
Each post
<div class="full-frame">
<div class="image-section">
<img [src]="defaultImage">
</div>
<div class="text-section">
<div class="text-section-row row0">
<span>{{imageData.name}}</span>
</div>
@runtimeZero
runtimeZero / file-upload.html
Created August 30, 2017 18:46
Code for uploading file
<div class="container">
<div class="row">
<div class="col-lg-8">
<div class="panel panel-default">
<div class="panel-body">
<input type="file" (change)="onFileSelection($event)" placeholder="Upload a file" accept=".png, .jpeg, .jpg">
</div>
</div>
@runtimeZero
runtimeZero / user-info-dropdown.txt
Created August 30, 2017 17:42
Drop-down menu to display user information
<li class="dropdown" *ngIf="isLoggedIn">
<a class="dropdown-toggle" data-toggle="dropdown" href="javascript: void(0)"><span class="user-name-display">{{name}}</span>
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="javascript:void(0)"><span class="user-title">Email: </span><span class="user-data">{{email}}</span></a></li>
<li><a href="javascript:void(0)"><span class="user-title">Uid: </span><span class="user-data">{{uid}}</span></a></li>
</ul>
</li>
@runtimeZero
runtimeZero / signup.html
Created August 28, 2017 22:09
Signup Form
```
<div class="container">
<div class="row">
<div class="col-lg-4">
<form (ngSubmit)="onSubmit(f)" #f="ngForm">
<div class="form-group">
<label for="email">Email</label>
<input type="email" name="email" id="email" ngModel class="form-control" required>
</div>