This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This script will makes a rushjs project ready for deployment in Firebase Cloud Functions. | |
* | |
* It creates a staging directory with rewritten package.json files, and all local rushjs dependencies copied. | |
* | |
* It requires ./firebase-files to contain: | |
* .firebaserc | |
* .firebase.json | |
* functions/tsconfig.json | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {head, tail} from "../../src/lodash/lodash"; | |
function extractTermsRecursive(collector: string[], accumulatingTerm: string, depth: number, currentCharacter: string | null, remainingCharacters: string[], openingDelimiter: string, closingDelimiter: any):string[] { | |
if(currentCharacter === null) { | |
return collector | |
} | |
if(currentCharacter === openingDelimiter) { | |
return extractTermsRecursive(collector, accumulatingTerm + currentCharacter, depth + 1, head(remainingCharacters), tail(remainingCharacters), openingDelimiter, closingDelimiter) | |
} | |
if(currentCharacter === closingDelimiter) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package learning.yatspec; | |
import com.googlecode.yatspec.junit.SpecRunner; | |
import com.googlecode.yatspec.state.givenwhenthen.*; | |
import org.eclipse.jetty.http.HttpStatus; | |
import org.hamcrest.Matcher; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import static org.eclipse.jetty.http.HttpStatus.Code.OK; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/> | |
</head> | |
<body> | |
<div class="container-fluid"> | |
<div class="row"> | |
<div class="col-md-1"></div> | |
<div class="col-md-10"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var fs = require('fs'); | |
var path = require('path'); | |
var AWS = require('aws-sdk'); | |
var util = require('util'); | |
var stream = require('readable-stream'); | |
var _ = require('lodash'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var Promise = require("es6-promise").Promise; | |
exports.learn = function (event, context) { | |
var promise = function (number) { | |
return new Promise(function (resolve, reject) { | |
var f = function(){resolve(number)}; | |
setTimeout(f, 5000); |