Skip to content

Instantly share code, notes, and snippets.

View inetbiz's full-sized avatar
💭
Honing my JSON+LD Structured Data Skills

Denver Prophit Jr. inetbiz

💭
Honing my JSON+LD Structured Data Skills
View GitHub Profile
@inetbiz
inetbiz / product.tpl
Last active August 29, 2015 14:20
Prestashop Product Detail Tabs *Alpha Code*
{*
* 2015 StrikeHawk eCommerce, Inc.
*
* NOTICE OF LICENSE
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
@inetbiz
inetbiz / server-response-time.sh
Last active August 5, 2016 14:50
Check your site's server response time! And, do a reverse traceroute in linux / mac shell
# Modify curl for your site lookup at the end of line
curl -s -w '\nLookup time:\t%{time_namelookup}\nConnect time:\t%{time_connect}\nAppCon time:\t%{time_appconnect}\nRedirect time:\t%{time_redirect}\nPreXfer time:\t%{time_pretransfer}\nStartXfer time:\t%{time_starttransfer}\n\nTotal time:\t%{time_total}\n' -o /dev/null http://www.example.com
# Use mtr for reverse traceroute. Change 192.168.1.1 to client reported IP address from whatismyip.com
mtr --report -c 5 192.168.1.1
@inetbiz
inetbiz / organization.json
Last active June 20, 2017 23:44
JSON+LD Organization Schema with extensive data
{
"@context": "http://schema.org",
"@type": "Organization",
"@id": "#publisher",
"@reverse":
{
"publisher":
{
"@type":"Website",
"potentialAction":
@jakubmikita
jakubmikita / Storable.php
Last active February 19, 2019 18:11
WordPress global storage using filter
<?php
/**
* Storable interface
*/
interface Storable extends \ArrayAccess, \Iterator {}
@inetbiz
inetbiz / wordpress-category-collectionpage-schema.html
Created August 21, 2014 18:06
WordPress Category Description in Schema.org Colletion Page markup
<div itemscope itemtype="http://schema.org/CollectionPage">
<meta itemprop="sameAs" content="https://en.wikipedia.org/wiki/Social_media" />
<a itemprop="url" href="https://www.example.org/category/social-media/"><img src="/wp-content/uploads/xxxx/xxxx/xxxxxx.png" width="95" height="100" itemprop="logo" alt="Social Media Iconic Representation" align="left"></a>
<div itemprop="name"><strong>Open Source Hardware</strong></div>
<div itemprop="description">Whatever description you are going to use that is contextual to both your sameAs content and the category loop</div>
</div>
@inetbiz
inetbiz / rv-camphost.json
Last active September 19, 2020 14:34
RV / Caravan Park Lodging Business JSON+LD
{
"@context": "https://schema.org/",
"@type": [
"LodgingBusiness",
"CampGround"
],
"@id": "#brand",
"sameAs": [
"http://www.facebook.com/your-profile",
"http://www.twitter.com/yourProfile",
@nternetinspired
nternetinspired / output-articles-by-collection.liquid
Last active April 25, 2021 02:17
Loop through Jekyll collections and output their content as sections and articles
{% comment %}
Loops though every collection you defined in _config.yml and grabs the pages they contain; outputting title and full text with good basic html semantics.
Use page.excerpt instead of page.content to grab the first paragraph, blog list style. Markdownify is optional, depends how you authored content in your collections; I typically use Markdown.
{% endcomment % }
{% for collection in site.collections %}
{% assign name = collection.label %}
<section>
@inetbiz
inetbiz / gtag.html
Last active August 19, 2021 14:44
Google Tag - User Timings
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxx-xx"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('set',{'content_group1':'{{page.title}}'});
if (window.performance) {
var timeSincePageLoad = Math.round(performance.now());
gtag('event', 'timing_complete', {
@inetbiz
inetbiz / .htaccess
Last active August 24, 2021 18:37
WordPress Security & Optimization in htaccess and Robots.txt
# BEGIN WordPress https://wordpress.org/support/article/htaccess/
<Files xmlrpc.php>
Order Deny,Allow
Deny from all
Allow [ Trusted Domains/IPs ]
</Files>
# FINISH XML RPC BLOCKING
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
@inetbiz
inetbiz / BreadCrumbs.html
Last active September 24, 2021 16:05
Jekyll Schema BreadCrumbs in JSON Format
"breadcrumb": {
"@type": "BreadcrumbList",
"itemListElement": [
{% assign crumbs = page.url | remove:'/index.html' | split: '/' %} {% assign crumbs_total = crumbs | size | minus: 1 %}{% for crumb in crumbs offset: 1 %}{% if forloop.index == crumbs_total %}
{
"@type": "ListItem",
"position": "{{ forloop.index }}",
"item": {
"@id": "{{ site.url }}{{ page.url }}",
"name": "{{ page.crumbtitle}}"