Skip to content

Instantly share code, notes, and snippets.

View joeybab3's full-sized avatar

Joey Babcock joeybab3

View GitHub Profile
@joeybab3
joeybab3 / search-section.liquid
Last active April 2, 2024 02:22
Shopify Search Section Dawn
{{ 'template-collection.css' | asset_url | stylesheet_tag }}
{{ 'component-card.css' | asset_url | stylesheet_tag }}
{{ 'component-price.css' | asset_url | stylesheet_tag }}
{{ 'component-search.css' | asset_url | stylesheet_tag }}
{%- if section.settings.enable_filtering or section.settings.enable_sorting -%}
{{ 'component-facets.css' | asset_url | stylesheet_tag }}
<script src="{{ 'facets.js' | asset_url }}" defer="defer"></script>
{%- endif -%}
@joeybab3
joeybab3 / cookies.js
Created July 21, 2022 17:30
JLab Cookie Functions
// https://stackoverflow.com/questions/14573223/set-cookie-and-get-cookie-with-javascript
function setCookie(name,value,days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/";
@joeybab3
joeybab3 / ArduinoSendPost.ino
Created April 27, 2021 05:25
ArduinoSendPost.ino
#include <WiFi.h>
#include <HTTPClient.h>
const char* ssid = "REPLACE_WITH_YOUR_SSID";
const char* password = "REPLACE_WITH_YOUR_PASSWORD";
//Your Domain name with URL path or IP address with path
const char* serverName = "http://192.168.1.106:1880/update-sensor";
// the following variables are unsigned longs because the time, measured in
@joeybab3
joeybab3 / generatesscc18.php
Last active August 20, 2019 16:16
Creates a sscc18 barcode
<?php
require_once 'vendor/autoload.php';
$number = 00002347350023848878;
$generator = new Picqer\Barcode\BarcodeGeneratorHTML();
$code = chr(241).$number;
?>
<!DOCTYPE html>
<html>
<body>
<?php echo $generator->getBarcode($code, Picqer\Barcode\BarcodeGeneratorPNG::TYPE_CODE_128_C, 2, 60); ?>
@joeybab3
joeybab3 / WordPress Bootstrap responsive embed
Last active July 8, 2019 16:10 — forked from wwdboer/WordPress Bootstrap responsive embed
WordPress Bootstrap responsive embed
/**
* Wrap embed html with bootstrap responsive embed div
*/
function bootstrap_embed($html, $url, $attr) {
if (!is_admin()) {
return "<div class=\"embed-responsive my-4 embed-responsive-16by9\">" . $html . "</div>";
} else {
return $html;
}
}
@joeybab3
joeybab3 / keybase.md
Created September 30, 2014 01:39
keybase.md

Keybase proof

I hereby claim:

  • I am joeybab3 on github.
  • I am joeybab3 (https://keybase.io/joeybab3) on keybase.
  • I have a public key whose fingerprint is 164E CFAE B224 E7C0 AD3B C213 D460 A5E6 2718 AC5B

To claim this, I am signing this object: