Skip to content

Instantly share code, notes, and snippets.

View Antoinebr's full-sized avatar
:octocat:
🔥

Antoinebr

:octocat:
🔥
View GitHub Profile
@Antoinebr
Antoinebr / hs-API-create-An-Email-Template.js
Created June 23, 2023 08:05
hs-API-create-An-Email-Template.js
View hs-API-create-An-Email-Template.js
const axios = require('axios');
const privateAppToken = "your-private-app-token-here-dqdsqs-qsdsqdsq";
const axiosConfig = {
headers: {
authorization: `Bearer ${privateAppToken}`
@Antoinebr
Antoinebr / hubspot-hubl.html
Created October 11, 2021 20:18 — forked from johnsfuller/hubspot-hubl.html
WordPress/PHP & HubSpot/HubL Comparison Cheat Sheet
View hubspot-hubl.html
<!-- 👇 Scroll down 👇 -->
{# variables #}
{% set my_variable = 'Hello world' %}
{# get variables from somewhere else #}
{% import 'path/to/hubl-variables.html' as site_vars %}
{{ site_vars.my_external_variable }}
View GKE.md

GKE

Set up a Redis master

Set up gcloud and kubectl credentials

gcloud container clusters get-credentials antoine-cluster  --zone europe-west4-c
@Antoinebr
Antoinebr / performance.md
Last active June 18, 2020 15:07
use performance object to get insights
View performance.md
View gist:d5867bda78ec4edee627a86dba2ce7a9

A service worker for basic offline

// always check for the most current version of Workbox
// https://github.com/GoogleChrome/workbox/releases
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.3/workbox-sw.js');

const OFFLINE_HTML = '/offline/offline.html';
const PRECACHE = [
  { url: OFFLINE_HTML, revision: '70f044fda3e9647a98f084763ae2c32a' }
@Antoinebr
Antoinebr / gist:2f2a0327479850d1077396d4c03a2018
Last active April 26, 2022 21:42 — forked from chrisle/gist:2252209
CURL as GoogleBot 2.1
View gist:2f2a0327479850d1077396d4c03a2018
curl --user-agent "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.1 Mobile Safari/537.36 (compatible);" -v $@
View standalone_ios.md

Detect standalone IOS

// Detects if device is on iOS 
const isIos = () => {
  const userAgent = window.navigator.userAgent.toLowerCase();
  return /iphone|ipad|ipod/.test( userAgent );
}
// Detects if device is in standalone mode
@Antoinebr
Antoinebr / wpt-script.md
Last active May 7, 2021 14:12
wpt-script.md
View wpt-script.md

An example of a webPageTest script

setEventName    Go to HomePage

navigate    https://monbraceletnato.fr

setEventName    Display category page

execAndWait document.querySelectorAll('.home-cta a')[1].click();
@Antoinebr
Antoinebr / event.js
Created July 30, 2019 18:37
event.js
View event.js
gtag('event', 'purchase', {
"transaction_id": "24.031608523954162",
"affiliation": "Google online store",
"value": 23.07,
"currency": "USD",
"tax": 1.24,
"shipping": 0,
"items": [
{
"id": "P12345",