Skip to content

Instantly share code, notes, and snippets.

View maestrojed's full-sized avatar

Jed Herzog maestrojed

  • Linkwell Health
  • New York, NY
View GitHub Profile
$api_key = "";
$ph_number = "";
// Initialize cURL.
$ch = curl_init();
// Set the URL that you want to GET by using the CURLOPT_URL option.
curl_setopt($ch, CURLOPT_URL, 'https://phonevalidation.abstractapi.com/v1/?api_key='%api_key'&phone='.$ph_number);
// Set CURLOPT_RETURNTRANSFER so that the content is returned as a variable.
diff --git a/web/themes/custom/quinoa/src/scss/components/_blocks--branding.scss b/web/themes/custom/quinoa/src/scss/components/_blocks--branding.scss
index 0cd9f4bea..8caf43be5 100644
--- a/web/themes/custom/quinoa/src/scss/components/_blocks--branding.scss
+++ b/web/themes/custom/quinoa/src/scss/components/_blocks--branding.scss
@@ -24,7 +24,7 @@
@include media($large-screen) {
display: block;
padding-left: $base-spacing;
- border-left: $base-border;
+ border-left: $site-name-and-slogan-border-left;
@maestrojed
maestrojed / gist:bdc0b508e11d8824bf97539435c79067
Created April 20, 2022 21:33
dig @8.8.8.8 wavemetrics.com
dig @8.8.8.8 wavemetrics.com A
; <<>> DiG 9.10.6 <<>> @8.8.8.8 wavemetrics.com A
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38608
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
@maestrojed
maestrojed / StorePageViewtoAdobe.js
Created November 17, 2021 19:43
Store Page View to Adobe
(function ($, Drupal) {
$(document).ready(function() {
console.log("Optum Store Adobe Analtyics _satellite track being prepared");
_satellite.track('page_viewed', {
'event_name': 'page viewed',
'page': {
'page_name': 'some page',
'website': 'global',
'site_section1': 'linkwell health',
@maestrojed
maestrojed / cta-impression-tracking.js
Created September 23, 2021 19:39
Track when CTAs are visibile and record them as impressions in Google Analytics.
Drupal.behaviors.ctaImpressions = {
attach: function (context, settings) {
//A JS Script to
// find each Linkwell CTA;
// for each unique CTA found track when it becomes visible;
// when it becomes visible push a non-interactive event to GA;
// no longer track this CTA's visibility to prevent duplicate GA events and hopefully lessen the performance impact;
// Look for and use Linkwell Source, Medium, and Campaign parameters. Override any UTM data
sourceParam = new RegExp('[\?&]source=([^&#]*)').exec(window.location.href);
if (sourceParam !== null){
var source = "";
source = decodeURI(sourceParam[1]) || 0;
ga('set', 'campaignSource', source);
}
mediumParam = new RegExp('[\?&]medium=([^&#]*)').exec(window.location.href);
if (mediumParam !== null){
// Default to an empty string
var source = "";
var medium = "";
var campaign = "";
// Look for and use UTM Source, Medium, and Campaign parameters
var sourceParam = new RegExp('[\?&]utm_source=([^&#]*)').exec(window.location.href);
if (sourceParam !== null){
source = decodeURI(sourceParam[1]) || 0;
}
//get the current query string.
const urlParams = new URLSearchParams(window.location.search);
if( urlParams.has('source') && urlParams.has('medium') && urlParams.has('campaign') ) {
const source = urlParams.get('source');
const medium = urlParams.get('medium');
const campaign = urlParams.get('campaign');
//Before ga("send", "pageview")
//if params were found.
var source = "";
var medium = "";
var campaign = "";
const sourceParam = new RegExp('[\?&]source=([^&#]*)').exec(window.location.href);
if (sourceParam !== null){
source = decodeURI(sourceParam[1]) || 0;
}
const mediumParam = new RegExp('[\?&]medium=([^&#]*)').exec(window.location.href);
if (mediumParam !== null){