Skip to content

Instantly share code, notes, and snippets.

View groundh0g's full-sized avatar

Joseph Hall (groundh0g) groundh0g

View GitHub Profile
@groundh0g
groundh0g / toc-page.css
Last active May 29, 2023 14:34
liquid script to generate simple table of contents from markdown
/* example CSS for TOC */
div.page-toc {
text-align: left;
}
div.page-toc a {
text-decoration: none;
color: inherit;
}
---
...
analytics:
provider: false # one of: false | google | matomo | getclicky | mixpanel | gauges
siteid: G-0000000000
baseurl: # only used by matomo; ex: mysite.com/piwik
comments:
provider: false # one of: false | facebook | disqus | intensedebate | duoshuo
siteid: 0000000000000000
...

Keybase proof

I hereby claim:

  • I am groundh0g on github.
  • I am groundh0g (https://keybase.io/groundh0g) on keybase.
  • I have a public key ASBMa-UnlhomjMX5GR7jZEiVEbJT6EufopJ92tHGK0H_xQo

To claim this, I am signing this object:

@groundh0g
groundh0g / string-as-array.liquid
Created April 29, 2018 22:11
Configurable string mangling; String as an array; Generate search keywords
# Treating a String as an Array in Liquid
## Example - Output Each Character
{% assign someProperty = "!#$%&'()*+,-./0123456789:;<=>?@[\]^_`{|}~" | append: '"' %}
{% assign len = someProperty | size | minus: 1 %}
{% for i in (0..len) %}{{ someProperty | slice: i }}{% endfor %}
## Example - Extracting Keywords for Searches
{% assign headBG = include.headBGColor | default: "#000" %}
{% assign headFG = include.headFGColor | default: "#fff" %}
{% assign grayDateBG = include.grayDateBGColor | default: "#eee" %}
{% assign grayDateFG = include.grayDateFGColor | default: "#888" %}
{% assign postDateBG = include.postDateBGColor | default: "#efe" %}
{% assign divWidth = include.width | default: "100%" %}
{% assign floatStyle = "" %}
{% if include.float %}
{% assign floatStyle = "float:" | append: include.float | append: ";" %}
@groundh0g
groundh0g / Export Sprites.jsx
Last active April 25, 2016 19:53
Export Sprites Script for Adobe Illustrator
#target Illustrator
/*
Copyright (c) 2015 Joseph B. Hall [@groundh0g]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is