Skip to content

Instantly share code, notes, and snippets.

View luke-lewandowski's full-sized avatar

Luke Lewandowski luke-lewandowski

  • Sydney, Australia
View GitHub Profile
@luke-lewandowski
luke-lewandowski / gist:f76f813b64949d4aba0cf6436aa9590d
Created September 28, 2021 13:39
CDKTF - Certificate Binding Issue
⠴ Deploying Stack: api
Resources
✔ AZURERM_APP_SERVICE dev-test-api-as azurerm_app_service.dev-test-api-as
~ AZURERM_APP_SERVICE_ supplier-certiicate azurerm_app_service_certificate_binding
CERTIFICATE_BINDING -binding .supplier-certiicate-binding
⠴ AZURERM_APP_SERVICE_ dev-test-api-custom azurerm_app_service_custom_hostname_bin
CUSTOM_HOSTNAME_BIND -hostname-binding ding.dev-test-api-custom-hostname-bindi
ING ng
~ AZURERM_APP_SERVICE_ dev-test-api-cert-b azurerm_app_service_managed_certificate
MANAGED_CERTIFICATE inding .dev-test-api-cert-binding
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="utf-8"> <!-- utf-8 works for most cases -->
<meta name="viewport" content="width=device-width"> <!-- Forcing initial-scale shouldn't be necessary -->
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Use the latest (edge) version of IE rendering engine -->
<meta name="x-apple-disable-message-reformatting"> <!-- Disable auto-scale in iOS 10 Mail entirely -->
<meta name="format-detection" content="telephone=no,address=no,email=no,date=no,url=no">
<!-- Tell iOS not to automatically link certain text strings. -->
@luke-lewandowski
luke-lewandowski / auto-app-redirect.js
Last active August 18, 2020 04:18
If put in the page this script will detect your UA and direct you to the correct window.
function getMobileOperatingSystem() {
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
// Windows Phone must come first because its UA also contains "Android"
if (/windows phone/i.test(userAgent)) {
return "Windows Phone";
}
if (/android/i.test(userAgent)) {
return "Android";
@luke-lewandowski
luke-lewandowski / firestore-csv-export.js
Last active August 10, 2020 23:40
How to export Firestore to CSV
// By Felipe Gómez Restrepo
export const createCSV = functions.firestore
.document('reports/{reportId}')
.onCreate((snap, context) => {
// Step 1. Set main variables
const reportId = context.params.reportId;
const fileName = reports/${reportId}.csv;