Skip to content

Instantly share code, notes, and snippets.

View JoseSoteloCohen's full-sized avatar

Jose Sotelo Cohen JoseSoteloCohen

View GitHub Profile
SWITCH([type],
"c", "Constant",
"remm", "Regular Expression",
"gas", "Google Analytics Settings",
"jsm", "Custom JavaScript",
"v", "Data Layer Variable",
"j", "JavaScript Variable",
"smm", "Lookup Table",
"d", "DOM",
"awec", "Google Ads User Provided Data",
SWITCH([type],
"ua", "Universal Analytics",
"gaawc", "GA4 Configuration",
"gaawe", "GA4 Event",
"html", "Custom HTML",
"cvt_57630621_205", "Facebook Ads",
"gclidw", "Conversion Linker",
"awct", "Google Ads Conversion",
"sp", "Google Ads Remarketing",
"hjtc", "HotJar",
with _data as (
select
date(orders.completed_at) as date,
sum(orders.order_total) as sales_total,
case
when date between '2019-10-01' and '2019-10-31' then 2100000
when date between '2019-11-01' and '2019-11-30' then 2500000
when date between '2019-12-01' and '2019-12-31' then 3300000
else 0
end as goal
with _data as (
select
date_trunc('week', orders.completed_at) as week, --tried to change to EST with convert_timezone('EST', completed_at) but didn't work
sum(orders.order_total) as sales_total,
users.signup_channel as signup_channel,
orders.order_category as order_category,
concat(concat(signup_channel, ' - '), order_category) as series --didn't understand how to use as a series
from orders
join users
on users.user_id = orders.user_id
// Primary section of the home
.primary-section > article {
z-index: 600
}
.darkmode--activated .primary-section .entry-header{
z-index: 500;
}
.darkmode--activated .custom-logo-link{
mix-blend-mode:darken
// functions.php //
function custom_post_excerpt_length($post_excerpt, $post)
{
$length = 70;
$excerpt = strlen($post_excerpt) > $length ? mb_substr($post_excerpt, 0, $length - 3, "utf-8") . "..." : $post_excerpt;
return $excerpt;
}
add_filter('get_the_excerpt', 'custom_post_excerpt_length', 20, 2);
// end functions.php //
<div itemscope itemtype="https://schema.org/Review">
<span class="escondido" itemprop="author" itemscope itemtype="https://schema.org/Person">
<span itemprop="name">José Sotelo</span>
</span>
<h3 itemprop="itemReviewed" itemscope itemtype="https://schema.org/thing"><span itemprop="name">{{ producto }}</span></h3>
<!-- UIUX -->
<div class="wp-block-review-progressbar">
<div class="review-block-progress-bar">
<div class="review-block-progress-labels review-position-outside">
<div class="review-block-progress-bar-title">UI/UX</div>
@JoseSoteloCohen
JoseSoteloCohen / blackoutFix.js
Last active August 15, 2019 02:28
Blackout Fix: for Authority Pro 1.2.0 child theme for the Genesis Framework 3.0.2
<script>
var $=jQuery.noConflict();
var blackoutFix = $('<style id="blackoutFix">.ab-block-post-grid-image a::before, .authority-featured-image::before, .featuredpost .has-post-thumbnail > a::before { display:none; }</style>');
function darkmode_fix(){
$('.darkmode-toggle').click(
function() {
if ($('body').hasClass('darkmode--activated')) {
$('head').append(blackoutFix);
$('body > div.site-container > div.site-inner > div.authority-featured-image').css('z-index', '501');
$('.ab-block-post-grid a').css('z-index', '501');