Skip to content

Instantly share code, notes, and snippets.

⚙️
working on v2 of Jekyll-IndieWeb

Michael Bishop miklb

View GitHub Profile
@miklb
miklb / style.css
Created Feb 27, 2019
basic css grid
View style.css
.site-header {
grid-area: header;
}
.site-content {
grid-area: content;
}
.widget-area {
grid-area: sidebar;
@miklb
miklb / walkthrough.md
Created Sep 22, 2018
working walk through of setting up a LEMP stack
View walkthrough.md

apt-get update && apt-get upgrade

hostnamectl set-hostname propJoe

dpkg-reconfigure tzdata

adduser miklb

adduser miklb sudo

View jquery.js
$('.menu-ui a').on('click', function() {
// For each filter link, get the 'data-filter' attribute value.
var filter = $(this).data('filter');
$(this).addClass('active').siblings().removeClass('active');
markers.setFilter(function(f) {
// If the data-filter attribute is set to "all", return
// all (true). Otherwise, filter on markers that have
// a value set to true based on the filter name.
return (filter === 'all') ? true : f.properties[filter] === true;
});
View mf_in_reply_to.txt
// Via desktop admin using post-kinds
a: 2: {
s: 4: "type";a: 1: {
i: 0;s: 6: "h-cite";
}
s: 10: "properties";a: 8: {
s: 9: "published";a: 1: {
i: 0;s: 25: "2018-09-03T18:11:07-04:00";
}
s: 7: "updated";a: 1: {
@miklb
miklb / functions.php
Created Apr 1, 2018 — forked from gRegorLove/functions.php
WordPress filter to approve webmentions from previously-approved domains
View functions.php
<?php
if ( !function_exists('indieweb_check_webmention') ) {
/**
* Using the webmention_source_url, approve webmentions that have been received from previously-
* approved domains. For example, once you approve a webmention from http://example.com/post,
* future webmentions from http://example.com will be automatically approved.
* Recommend placing in your theme's functions.php
*
@miklb
miklb / functions.php
Last active Feb 28, 2018
Override ZenPress header image dimensions
View functions.php
function zenpress_setup()
{
// This theme supports a custom header
// Change the width and height here
$cooking_header_args = array(
'width' => 1250,
'height' => 400,
'header-text' => true,
);
@miklb
miklb / functions.php
Created Jan 27, 2018
Wrap $content in e-content
View functions.php
/**
* Wraps the_content in e-content
*
*/
function mf2_s_the_content( $content ) {
if ((mf2_s_template_type()=='article')||(is_page())) {
$wrap = '<div class="entry-content e-content"><p>';
}
else {
$wrap = '<div class="entry-content e-content p-name"><p>';
@miklb
miklb / functions.php
Created Jan 20, 2018
function to add featured image to feed
View functions.php
/**
* Featured image in atom feed.
* @method featuredtoRSS
* @param $string $content post content.
* @return $string $content updated content w/image.
*/
function independence_featuredtorss( $content ) {
global $post;
if ( has_post_thumbnail( $post->ID ) ) {
$content = '<div>' . get_the_post_thumbnail( $post->ID, 'medium', array(
View functions.php
/**
* Unspam Webmentions
*
* @method unspam_webmentions
* @param [type] $approved [description].
* @param [type] $commentdata [description].
* @return [type] [description]
*/
function unspam_webmentions( $approved, $commentdata ) {
View functions.php
/**
* Featured image in atom feed.
* @method featuredtoRSS
* @param $string $content post content.
* @return $string $content updated content w/image.
*/
function independence_featuredtorss( $content ) {
global $post;
if ( has_post_thumbnail( $post->ID ) ) {
$content = '<div>' . get_the_post_thumbnail( $post->ID, 'medium', array(
You can’t perform that action at this time.