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
| <a href="https://stephanestorm.groovepages.com/ouvrezuncomptegratuit" | |
| class="link relative button-reset pa3 db tc ba b--transparent bg-animate pointer w-100 br2 fw8" | |
| target="_blank"> | |
| Plateforme Marketing Digitale | |
| </a> |
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
| <details class="pv1 ph2 ph4-ns mw6 center cf tc"> | |
| <summary class="bg-blue link relative button-reset pv3 white db tc ba b--transparent bg-animate pointer w-100 br2 fw8"> | |
| Details | |
| </summary> | |
| <ul class="list pl0 ml0 center mw6 ba b--light-silver br3"> | |
| <li class="ph3 pv2 bb b--light-silver"> | |
| <a href="#">Top Option</a> | |
| </li> | |
| <li class="ph3 pv2 bb b--light-silver"> | |
| <a href="#">Middle Option(s)</a> |
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
| //pseudocode, a mix of frontend + backend javascript: | |
| //step1 (frontend): | |
| const checkout = async () => { | |
| try { | |
| let resp = await fetch(`/api/checkout`, { | |
| method: "POST", | |
| headers: { | |
| "content-type": "application/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 { timestamp, build, files } from '$service-worker'; | |
| const name = `cache-${timestamp}`; | |
| self.addEventListener('install', (event) => { | |
| event.waitUntil(caches.open(name).then((cache) => cache.addAll(['/', ...build, ...files]))); | |
| }); | |
| self.addEventListener('activate', (event) => { | |
| event.waitUntil( |
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 personModel = [ | |
| { label: "First", value: "first" }, | |
| { label: "Last", value: "last" }, | |
| { label: "Address1", value: "address1" }, | |
| { label: "Address2", value: "address2" }, | |
| { label: "City", value: "city" }, | |
| { label: "State", value: "state" }, | |
| { label: "Zip", value: "zip" }, | |
| { label: "Zip4", value: "zip4" }, |
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
| <script async | |
| src="https://maps.googleapis.com/maps/api/js?key=***YOURAPIKEY***&libraries=places&callback=initMap"> | |
| </script> | |
| <script> | |
| window.initMap= function(){ | |
| const input = document.querySelector('input[name="address"]'); | |
| const options = { | |
| componentRestrictions: { country: "us" }, | |
| fields: ["address_components", "geometry", "icon", "name"], | |
| types: ["establishment"], |
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
| // https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP | |
| // https://scotthelme.co.uk/content-security-policy-an-introduction/ | |
| // scanner: https://securityheaders.com/ | |
| const rootDomain = `your-domain.com`; // or your server IP for dev | |
| const directives = { | |
| 'img-src': [ | |
| "*", | |
| "'self'", |
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
| <-- place this in the Custom Code section, or in a clode block below the form --> | |
| <script> | |
| var form= document.querySelector('form'); | |
| var submitBtn= document.getElementById('submit'); | |
| var textareaWrap= document.createElement('div'); | |
| textareaWrap.className= 'relative db cf'; | |
| var textareaLabel= document.createElement('label'); | |
| textareaLabel.innerHTML= 'Textarea Label Here'; | |
| textareaWrap.appendChild(textareaLabel); | |
| var textarea= document.createElement('textarea'); |
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 pkg from 'pdf-lib/cjs/index.js'; | |
| const { PDFDocument } = pkg; | |
| export const get = async (req, context) => { | |
| const pdfDoc = await PDFDocument.create(); | |
| const page = pdfDoc.addPage(); | |
| page.drawText('You can create PDFs!'); | |
| const pdfBytes = await pdfDoc.save(); | |
| return { | |
| body: Buffer.from(pdfBytes, 'binary'), |
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 { firebase } from "$services/firebaseAdmin"; | |
| export const get = async (req, context) => { | |
| const globalRef = firebase.firestore().collection('global'); | |
| let data = { | |
| now: Date.now() | |
| }; | |
| const snapshot = await globalRef.get(); | |
| snapshot.forEach(doc => { |