Skip to content

Instantly share code, notes, and snippets.

Jake Bellacera jakebellacera

Block or report user

Report or block jakebellacera

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am jakebellacera on github.
  • I am jakebellacera (https://keybase.io/jakebellacera) on keybase.
  • I have a public key ASC4p2BMaTpJb1AMSJvdMhW60Cu5d_gmkrqk5kRDdrG1rwo

To claim this, I am signing this object:

View split-track-examples.js
// Events are tracked using the Split.track() method
//
// The format is as follows:
// split.track(CUSTOMER_ID, TRAFFIC_TYPE, EVENT_TYPE, VALUE)
// Example #1: Track page load time
split.track(USER_ID, "user", "page_load_time", 5.5346);
// Example #2: Track API response time
split.track(USER_ID, "user", "api_response_time", 1.7459);
@jakebellacera
jakebellacera / 0-slack-standup.txt
Last active Nov 8, 2018
A preview of how a standup message should be formatted within Slack
View 0-slack-standup.txt
Yesterday:
> * Redesigned dashboards
> * Drafted blog post
> * Speced out homepage redesign plan
Today:
> * Peer review blog post copy with @lenore
> * Review homepage redesign plan with design team
View android-split-feature-flag-example.java
SplitClient split = SplitFactoryBuilder.build("YOUR_API_KEY").client();
String treatment = split.getTreatment("USER_ID", "my-feature");
if (treatment.equals("on")) {
// insert on code here
} else if (treatment.equals("off")) {
// insert off code here
} else {
// insert control code here
@jakebellacera
jakebellacera / hubspot-adwords-gclid-tracking.js
Last active Jul 23, 2019
Simple HubSpot gclid tracking code integration
View hubspot-adwords-gclid-tracking.js
// The script below will ensure that gclid parameters are associated with
// contacts in HubSpot.
//
// A few things are required before this script will work:
//
// * You will need to have the HubSpot tracking code installed on the page. A
// few modifications will be required if you don't have the tracking code
// installed. Additionally, you will lose out on the built-in cross-domain
// features that the hubspot tracking code uses to store cookies.
// * You will need to have this script installed on every page.
View hubspot-tracking-code-context-tutorial.js
/*
* HubSpot's tracking code object is inaccessible from the global context, but by
* pushing functions to the HubSpot tracking code's queue, you can access it via
* the arguments passed to the callback function.
*/
_hsq.push(function(hstc, ctx) {
console.log(hstc); // HubSpot tracking code object
console.log(ctx); // HubSpot tracking code context
@jakebellacera
jakebellacera / bootstrap-4-menu-wordpress-filters.md
Last active Aug 8, 2019
Bootstrap 4 menus in WordPress via filters. No walker needed!
View bootstrap-4-menu-wordpress-filters.md

Bootstrap 4 menus in WordPress with filters

No walker needed!

This snippet allows you to create Bootstrap 4 menus without the use of a Walker. Instead, we're using filters to leverage WordPress core functionality as much as possible. Basically, all you need to do is this and you're done:

<nav class="navbar navbar-expand-lg fixed-top">
  <div class="container">
    <a class="navbar-brand" href="<?php echo home_url(); ?>">
@jakebellacera
jakebellacera / _Integrate-Yoast-and-CoAuthors-Plus-in-WordPress.md
Last active Feb 2, 2018
Integrate Yoast and CoAuthors Plus in WordPress
View _Integrate-Yoast-and-CoAuthors-Plus-in-WordPress.md

Integrate Yoast and Co-Authors Plus

If your WordPress site utilizes both Co-Authors Plus and Yoast, you may be aware that the two plugins don't fully integrate with eachother. The PHP code below fixes the following issues:

  • When viewing a Co-Author's page, Yoast's author name (%%name%%) meta tag template variables will properly show the Co-Author's name.
  • When viewing a Co-Author's page, Yoast's breadcrumb trail will properly show the Co-Author's name.

How to install

Simply drop the code below into your theme's functions.php file.

@jakebellacera
jakebellacera / robots.txt
Created Sep 14, 2017
Robots.txt file instructing crawlers to not crawl any pages on the hostname
View robots.txt
User-agent: *
Disallow: /
@jakebellacera
jakebellacera / .htaccess-wordpress
Created Aug 7, 2017
Default htaccess configuration for a WordPress site
View .htaccess-wordpress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
You can’t perform that action at this time.