Skip to content

Instantly share code, notes, and snippets.

View mholubowski's full-sized avatar

Mike Holubowski mholubowski

  • PLY Technologies
  • California
View GitHub Profile
@mholubowski
mholubowski / limeleads-db-custom.css
Last active August 19, 2017 03:07
Testing External CSS LL/Database
.react-SearchNav {
display: none;
}
.react-MainBody {
border: 10px solid pink !important;
}
@mholubowski
mholubowski / setup.txt
Created October 15, 2019 01:11
mikes-setup
// tsconfig.json
{
"compilerOptions": {
"outDir": "./dist/",
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"strict": true,
"noImplicitAny": true,
"noImplicitThis": true,
@mholubowski
mholubowski / emails.html
Created December 10, 2021 06:41
Solid Affiliate Email Templates - (Affiliate Manager - Registration Notification)
<table id="bodyTable" style="border-collapse: collapse; height: 100%; margin: 0; padding: 0; width: 100%; background-color: #fafbff;" border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td id="bodyCell" style="height: 100%; margin: 0; padding: 60px 0; width: 100%;" align="center" valign="top">
<table style="width: 600px;" border="0" width="600" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td style="width: 600px;" align="center" valign="top" width="600">
<table class="templateContainer" style="border-collapse: collapse; border: 1px solid #d9e1ec; max-width: 600px !important;" border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody>
@mholubowski
mholubowski / emails-2.html
Created December 10, 2021 06:42
Solid Affiliate Email (Affiliate Manager - Referral Notification)
<table id="bodyTable" style="border-collapse: collapse; height: 100%; margin: 0; padding: 0; width: 100%; background-color: #fafbff;" border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td id="bodyCell" style="height: 100%; margin: 0; padding: 60px 0; width: 100%;" align="center" valign="top">
<table style="width: 600px;" border="0" width="600" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td style="width: 600px;" align="center" valign="top" width="600">
<table class="templateContainer" style="border-collapse: collapse; border: 1px solid #d9e1ec; max-width: 600px !important;" border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody>
@mholubowski
mholubowski / emails-3.html
Created December 10, 2021 06:43
Solid Affiliate Email (Affiliate - Application Accepted)
<table id="bodyTable" style="border-collapse: collapse; height: 100%; margin: 0; padding: 0; width: 100%; background-color: #fafbff;" border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td id="bodyCell" style="height: 100%; margin: 0; padding: 60px 0; width: 100%;" align="center" valign="top">
<table style="width: 600px;" border="0" width="600" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td style="width: 600px;" align="center" valign="top" width="600">
<table class="templateContainer" style="border-collapse: collapse; border: 1px solid #d9e1ec; max-width: 600px !important;" border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody>
@mholubowski
mholubowski / emails-4.html
Created December 10, 2021 06:44
Solid Affiliate Email (Affiliate - Referral Notification)
<table id="bodyTable" style="border-collapse: collapse; height: 100%; margin: 0; padding: 0; width: 100%; background-color: #fafbff;" border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td id="bodyCell" style="height: 100%; margin: 0; padding: 60px 0; width: 100%;" align="center" valign="top">
<table style="width: 600px;" border="0" width="600" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td style="width: 600px;" align="center" valign="top" width="600">
<table class="templateContainer" style="border-collapse: collapse; border: 1px solid #d9e1ec; max-width: 600px !important;" border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody>
@mholubowski
mholubowski / solid-affiliate-snippet-cookies-1.php
Created January 11, 2022 20:32
Snippet which will make Solid Affiliate (v1.0.20) change it's cookie days based on the affiliate
add_filter(
'solid_affiliate/settings/get',
function ($val, $key) {
$id_of_affiliate_which_should_have_1_day_cookie = 1;
if ($key === \SolidAffiliate\Lib\Settings::KEY_COOKIE_EXPIRATION_DAYS) {
$maybe_affiliate = \SolidAffiliate\Lib\VisitTracking::_affiliate_from_request($_REQUEST);
if ($maybe_affiliate && ($maybe_affiliate->id === $id_of_affiliate_which_should_have_1_day_cookie)) {
return 1;
@mholubowski
mholubowski / delete-old-visits.php
Created February 26, 2022 05:45
Solid Affiliate Delete Old Visits
$ids = \SolidAffiliate\Models\Visit::select_ids([
'referral_id' => 0,
'created_at' => [
'operator' => '<',
'value' => \SolidAffiliate\Lib\Utils::date_picker_time('-30 days')
]
]);
foreach ($ids as $id) {
\SolidAffiliate\Models\Visit::delete($id, false);
@mholubowski
mholubowski / solid-affiliate-snippet-get_user_id_of_affiliate_who_referred_the_current_visitor.php
Last active March 22, 2022 10:06
solid-affiliate-snippet-get_user_id_of_affiliate_who_referred_the_current_visitor.php
<?php
/**
* This function will attempt to find the Affiliate who referred the current visitor,
* and then return the user id of that affiliate.
*
* Example:
* $id = get_user_id_sld (); defaults user id to "1"
* $id = get_user_id_sld ( 2 ); defaults user id to "2"
*
* @param integer $user_id_to_return_if_no_affiliate_found
@mholubowski
mholubowski / psalm.xml
Created August 30, 2022 23:56
Solid Affiliate's psalm.xml
<?xml version="1.0"?>
<!-- See https://psalm.dev/docs/running_psalm/configuration/#projectfiles -->
<psalm
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
phpVersion="5.6.20"
errorLevel="1"
resolveFromConfigFile="true"