Skip to content

Instantly share code, notes, and snippets.

@blueprintmrk
blueprintmrk / template_page_full-width.php
Last active February 21, 2021 04:32
Christianus: Full Width Page Template (template_page_full-width.php)
<?php
/*
Template Name: Full Width
@LowriWilliams
LowriWilliams / synonyms_antonyms.ipynb
Created January 25, 2021 14:04
wn/synonyms_antonyms.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{% when 'page' %}
<li>
<a href="{{ page.url }}" aria-current="page">{{ page.title }}</a>
</li>
{% assign t = template | split: '.' | first %}
<nav class="breadcrumbs" aria-label="breadcrumbs">
<ol>
<li>
<a href="/" title="Home">Home</a>
</li>
{% case t %}
{% when 'page' %}
@blueprintmrk
blueprintmrk / twitter-cards.liquid
Created June 9, 2020 15:40 — forked from kitop/twitter-cards.liquid
Twitter Cards Snippet for Shopify Stores
{% comment %}
This is for widgets that share content on Twitter.
Twitter developer info: https://dev.twitter.com/docs/cards
Brought to you by Viralica http://viralica.com
{% endcomment %}
{% if template contains 'product' %}
<meta name="twitter:card" content="product">
<meta name="twitter:title" content="{{ product.title }}" />
<meta name="twitter:description" content="{{ product.description | strip_html | strip_newlines | truncatewords: 160, '' | escape }}" />
@spivurno
spivurno / gp-easy-passthrough-edit-entry.php
Last active November 10, 2021 19:39
Gravity Perks // Easy Passthrough // Edit Entry
<?php
/**
* WARNING! THIS SNIPPET MAY BE OUTDATED.
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library:
* https://github.com/gravitywiz/snippet-library/blob/master/gp-easy-passthrough/gpep-edit-entry.php
*/
/**
* Gravity Perks // Easy Passthrough // Edit Entry
*
* Edit entry ID specified in field with current form submission.
<?php
/**
* Gravity Wiz // Gravity Forms // Map GF Checkbox Field to ACF Checkbox Field (User Meta)
* http://graivtywiz.com/
*/
add_filter( 'gform_user_registration_meta_value', function( $value, $meta_key ) {
// Update "checkboxes" to your custom field's name.
if( $meta_key === 'checkboxes' ) {
$value = array_map( 'trim', explode( ',', $value ) );
}
@willcritchlow
willcritchlow / personalized-pr.py
Last active November 28, 2018 18:40
Networkx snippet with personalization
import networkx as nx
site = nx.DiGraph()
# load links from crawl into a list of dictionaries called edges with keys 'Source' and 'Destination'
for edge in edges:
site.add_edges_from([(edge['Source'], edge['Destination'])])
# set norm_mr to be an array of normalized raw mozranks for the nodes in site
@philipgledhill
philipgledhill / Useful-column-class-code-snippets.html
Created September 12, 2016 14:24
Useful code snippets for Genesis Column Classes
<!-- Two one-half columns -->
<div class="one-half first">Content goes here.</div>
<div class="one-half">Content goes here.</div>
<div class="clearfix"></div>
<!-- Three one-third columns. -->
<div class="one-third first">Content goes here.</div>
<div class="one-third">Content goes here.</div>
<div class="one-third">Content goes here.</div>
<div class="clearfix"></div>
@chrisgoddard
chrisgoddard / json-ld-gtm.html
Last active July 23, 2023 16:52
JSON-LD GTM Tag
<script>
(function(){
var data = {
"@context": "http://schema.org",
"@type": "BlogPosting",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": {{Page URL}}
},
"headline": {{SCHEMA - Article Headline}},