Skip to content

Instantly share code, notes, and snippets.

View harrisonrw's full-sized avatar

Robert Harrison harrisonrw

View GitHub Profile
@harrisonrw
harrisonrw / ReadFromBigQueryViaFirebaseFunction.js
Created January 26, 2022 22:17
Read from BigQuery via Firebase Function
const functions = require("firebase-functions");
const {BigQuery} = require('@google-cloud/bigquery');
exports.getMostPolluted = functions.https.onCall((data, context) => {
const bigQuery = new BigQuery();
const query = 'SELECT location, city, country, value, timestamp FROM `bigquery-public-data.openaq.global_air_quality` WHERE pollutant = "pm25" AND timestamp > "2020-01-01" ORDER BY value DESC LIMIT 10';
return bigQuery.query(query)
@harrisonrw
harrisonrw / UIView+RoundedCorners.swift
Created July 23, 2019 03:12
Swift extension on UIView to round the corners
// UIView+RoundedCorners.swift
//
// Created by Robert Harrison on 7/22/19.
// Copyright © 2019 Robert Harrison. All rights reserved.
//
// Usage:
// view.roundCorners([.topLeft, .topRight], cornerRadius: 8.0)
import UIKit