Skip to content

Instantly share code, notes, and snippets.

curl -X POST https://api.golfcanada.ca/api/v1/members/webhook -H "Content-Type: application/json" --data '{"individualId":2837360,"userName":"sully@yllus.com","networkId":4474488,"localId":null,"golfCanadaCardId":"6106821450","firstName":"Sully","lastName":"Syed","gender":"M","birthDate":"1981-06-11T00:00:00","culture":"en-CA","imagePath":null,"friendCount":25,"handicap":27.8,"handicapSuffix":null,"displayHandicap":"27.8","handicapDate":"2023-08-10T00:00:00","lowHandicap":null,"displayLowHandicap":"NH","lowHandicapDate":null,"email":"sully@yllus.com","homePhone":null,"mobilePhone":"647-298-4401","line1":"425 Queen St. E","line2":"Apartment #A","city":"Toronto","region":"ON","postalCode":"M5A1T5","clubId":673,"sourceClubId":null,"clubName":"Golf House Golf Club","isActive":true,"isPrimary":true,"isArchived":false,"isClubManagingUpgrades":true,"managementGroup":"GolfCanada","expirationDate":"2023-12-31T00:00:00","clubMembershipLevel":"Gold","clubCategoryType":"Partner","clubMembershipType":"FullMembership","clu
@yllus
yllus / ImportEnvironicsDemographics.php
Created April 17, 2023 15:59
Laravel CLI command to import Environics demographics data per postal code into PostgreSQL
<?php
namespace App\Console\Commands;
use Illuminate\Support\Str;
use Illuminate\Console\Command;
class ImportEnvironicsDemographics extends Command
{
/**
@yllus
yllus / media-queries-b4.scss
Created July 8, 2020 15:42 — forked from akolinski/media-queries-b4.scss
Media queries using SASS in Bootstrap 4
// -- Default media queries
// Extra small devices (Mobile phones, 0px and up)
// No media query needed since this is the default in Bootstrap
// Small devices (landscape phones, 576px and up)
@include media-breakpoint-up(sm) { ... }
// Medium devices (tablets, 768px and up)
@include media-breakpoint-up(md) { ... }
@yllus
yllus / tacklehunger_google_analytics_code.js
Created May 4, 2020 18:56
tacklehunger_google_analytics_code.js
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-101110544-8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-101110544-8');
</script>
@yllus
yllus / TRIALFIRE.js
Created February 7, 2020 22:49
Trialfire library for ticats.ca
<!-- Trialfire Start -->
<script src="//cdn.trialfire.com/tf.js"></script>
<script>Trialfire.init('d868f38b-0943-4ada-a0a7-560ca325a62b');</script>
<!-- Trialfire End -->
<?php
// Rules:
// 1) Get the top three teams by points from each division.
// 2) For each division, check to see if the 3rd place team in it has less points than the
// 4th place team of the other division (must have at least one point less, a tie means no crossover occurs).
// 2a) If it does, insert that 4th place team above the other division's 3rd place.
// 2b) Else leave the standings for that division as-is.
public static function get_crossover( $args ) {
// If the season request is < 2016, return an empty object.
// Took this JavaScript code from:
// https://ticats.ca/video/thomas-erlington-goes-75-yards-to-the-house
// Added some comments (look for COMMENT:) on what may need to be modified for the preroll ads to show successfully.
<script type="text/javascript">
function vastFromTags( tags, channels ) {
if ( tags ) {
var keywords = '&Tags=' + tags;
}
<!-- START: Put this in the header of your page; if you already have another ad unit on the page this is probably a duplicate and unnecessary. -->
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
<!-- END: Put this in the header of your page; if you already have another ad unit on the page this is probably a duplicate and unnecessary. -->
<!-- START: This is the actual ad unit, so place it where you want the big box ad to appear. -->
<script>
window.googletag = window.googletag || {cmd: []};
googletag.cmd.push(function() {
googletag.defineSlot('/103711331/Ticats_BigBox', [300, 250], 'div-gpt-ad-1561482442188-0').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
<!-- START: Put this in the header of your page; if you already have another ad unit on the page this is probably a duplicate and unnecessary. -->
<script async='async' src='https://www.googletagservices.com/tag/js/gpt.js'></script>
<script>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
</script>
<!-- END: Put this in the header of your page; if you already have another ad unit on the page this is probably a duplicate and unnecessary. -->
<!-- START: This is the actual ad unit, so place it where you want the leaderboard to appear. -->
<script>
@yllus
yllus / cfl_adroll.js
Created May 10, 2019 14:26
CFL AdRoll Pixel JavaScript
<script type="text/javascript">
adroll_adv_id = "VCFLFD3OXNHUHFWE65TTX6";
adroll_pix_id = "4J6TAQVMYBHN5NUJU3YQOS";
(function () {
var _onload = function(){
if (document.readyState && !/loaded|complete/.test(document.readyState)){setTimeout(_onload, 10);return}
if (!window.__adroll_loaded){__adroll_loaded=true;setTimeout(_onload, 50);return}
var scr = document.createElement("script");
var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com");