Skip to content

Instantly share code, notes, and snippets.

@dylan-k
dylan-k / wordpress-post-metadata.php
Last active October 20, 2021 18:22
Wordpress Post Metadata Snippet
<?php
/*
Snippet Name: Dylan's Post-Metadata Snippet for Wordpress.
Description: Shows the date with lots of extra features. the year links to the year, the month to the month, the day to the day. with a plugin, you can also show details like "late in the evening" and "two years ago"
Dependencies:
http://wordpress.org/plugins/when/
http://wordpress.org/extend/plugins/wp-days-ago/
Usage:
I like to store this file in /theme/templates/parts/post-meta.php
then i can just do this to bring it up: <?php get_template_part( '/templates/parts/post', 'meta' ); ?>
@dylan-k
dylan-k / bootstrap-masonry.html
Created December 18, 2013 19:22
masonry for bootstrap
<!--
Snippet Name: Masonry for Bootstrap
Description: Masonry is a JavaScript grid layout library. This code will add masonry abilities to any Bootstrap page.
Usage: paste this sucker at the bottom of your HTML. Note the #container and .thumbnail items. You can change those as needed.
-->
<!-- Load JS and start masonry -->
<script type="text/javascript" src="http://masonry.desandro.com/masonry.pkgd.min.js"></script>
<script type="text/javascript">
@dylan-k
dylan-k / regex.md
Last active November 16, 2022 16:54
Useful Regular Expressions
@dylan-k
dylan-k / poem.sublime-snippet
Last active March 31, 2016 17:55
Sublime Text Snippet to Create YAML Metadata Headers for Poems in Markdown
<snippet>
<content><![CDATA[
---
title: "$1"
author: Dylan Kinnett
date: $2
publication:
status: Draft
tags: []
note: |
#!/usr/bin/ruby
# Sifttter: An IFTTT-to-Day One Logger by Craig Eley 2014 <http://craigeley.com>
# Based on tp-dailylog.rb by Brett Terpstra 2012 <http://brettterpstra.com>
#
# Notes:
# * Uses `mdfind` to locate a specific folder of IFTTT-generated text files changed in the last day
# * The location of your folder should be hardcoded in line 53
# * Scans leading timestamps in each line matching today's date
# * Does not alter text files in any way
# * Changes ampersand ('&') to 'and' so the script keeps running
@dylan-k
dylan-k / portraits-landscapes-notes.md
Last active August 29, 2015 14:08
portraits and landscapes note

To decide whether the chapbook is "ready" or not, I read through every poem in the manuscript and for each I assigned a value of "yes", "no", or "maybe". Here are the results. I would like to replace the pieces marked "no" with others that are more similar to the pieces marked "yes".

yes (5)

Beautiful Mannequins                                        09
Ghost City                                                  14
The New World                                               18

Walls 27

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Masonry Template</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700">
@dylan-k
dylan-k / readings.yml
Last active September 4, 2024 09:43
Readings and Performances by Dylan Kinnett
---
# Readings and Performances by Dylan Kinnett
# more info: www.nocategories.net
# gist: https://gist.github.com/dylan-k/cc11e9e5a66ac7b85601
# reference: http://pandoc.org/MANUAL.html#citations
#
# EXAMPLE DATA STRUCTURE
# - event: "Title of event"
# genre: "Spoken Word Performance"
# location: "Venue, City, State"
@dylan-k
dylan-k / story.md
Last active August 29, 2015 14:14
example of a markdown file for experiments learning to convert markdown to PDF, using a LaTeX document class.
title author wordcount date
Document Title
Firstname Lastname
1000
2015-01-24

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Donec gravida quis augue in tincidunt. Ut pulvinar ac sapien venenatis dignissim. Fusce vulputate congue dui, at dictum risus congue vel. Vivamus rutrum commodo nunc, sed elementum velit consectetur nec. Aenean sit amet tellus non nisi vulputate ornare. Vestibulum in nibh cursus, volutpat leo in, auctor lacus. Donec euismod suscipit nunc sed tempus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ullamcorper est in erat efficitur congue. Integer ullamcorper ac lorem non maximus. Aliquam ut placerat nisl, eget euismod ante.

Section 1

@dylan-k
dylan-k / story.latex
Last active February 26, 2025 02:00
a pandoc template to make PDF files with standard manuscript formatting
% -----------------------------------------------------------------------------
%
% STANDARD MANUSCRIPT FORMAT LaTeX TEMPLATE FOR PANDOC
%
% NOTE: This template has a newer version:
% https://github.com/dylan-k/panscribe/blob/main/templates/story.latex
% Comments and Pull Requests are Welcome
%
% -----------------------------------------------------------------------------