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
#!/usr/bin/env bash | |
# editorconfig-checker-disable | |
cat <<EOF | |
-------------------------------------------------------------------------------- | |
/@@#///////@@/(@//@%/(@.@( @@ | |
@@//////////////////////////////#* @@@ | |
@////@//(///////////@@@@@///@//@/@**//@@( | |
@///////@///////////////@@@@ ( @, |
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
/** | |
* Takes any 11ty shortcode that takes an argument and converts | |
* it into a NJK extension. | |
* | |
* @param {string} name The name of the extension/shortcode | |
* @param {(...args: any[]) => any} func The code to execute | |
* @returns {import('nunjucks').Extension} A NJK extension | |
*/ | |
module.exports = function createNJKExtension(name, func) { | |
/** @type {import('nunjucks').Extension} */ |
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
const {SecretManagerServiceClient} = require('@google-cloud/secret-manager'); | |
const client = new SecretManagerServiceClient(); | |
const cloudSecrets = async () => { | |
if (!process.env.PROJECT_ID) { | |
return console.warn( | |
'No Google Cloud Project ID found, no .env file is being generated.' | |
); | |
} |
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
const admin = require("firebase-admin"); | |
const { GeoFirestore, GeoCollectionReference } = require("geofirestore"); | |
/** | |
* Generate new private key by selecting a project from below: | |
* https://console.firebase.google.com/u/0/project/_/settings/serviceaccounts/adminsdk | |
*/ | |
const SERVICE_ACCOUNT = require("./serviceAccountKey.json"); | |
/** | |
* Set the collection to update here. |
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
/* tslint:disable:no-import-side-effect no-namespace no-shadowed-variable */ | |
export namespace Dialogflow { | |
/** The basic card message. Useful for displaying information. */ | |
export interface BasicCard { | |
/** Optional. The title of the card. */ | |
title?: string; | |
/** Optional. The subtitle of the card. */ | |
subtitle?: string; | |
/** Required, unless image is present. The body text of the card. */ | |
formattedText?: string; |
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 * as admin from 'firebase-admin'; | |
import * as functions from 'firebase-functions'; | |
import { GeoFirestore } from 'geofirestore'; | |
import '@google-cloud/firestore/types/firestore'; | |
admin.initializeApp(); | |
// A simple cloud function that will take any doc created in the geocollection collection and convert it to a geofirestore doc | |
const onCreate = functions.firestore | |
.document('geocollection/{uid}') |
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 * as admin from 'firebase-admin'; | |
import * as gf from 'geofirestore'; | |
import * as yargs from 'yargs'; | |
let db: FirebaseFirestore.Firestore = null; | |
const argv: yargs.Arguments = yargs.argv; | |
/** | |
* Flag to indicate whether function is executing in Cloud Functions or locally | |
*/ |
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 { Injectable } from '@angular/core'; | |
import { Meteor } from 'meteor/meteor'; | |
import { MeteorComponent } from 'angular2-meteor'; | |
import { BehaviorSubject } from 'rxjs/BehaviorSubject'; | |
// Collections | |
import { Posts } from '/imports/collections/posts/collection'; | |
/** | |
* @class PostsService |