Skip to content

Instantly share code, notes, and snippets.

[[- https://stackoverflow.com/questions/54362229/getting-seo-errors-with-breadcrumblist]]
[[pdoCrumbs?
&tplWrapper=`@INLINE
<nav class="breadcrumb">
<ol class="breadcrumb__list" itemscope itemtype="http://schema.org/BreadcrumbList">
[[+output]]
</ol>
</nav>`
&tpl=`@INLINE
mixin breadcrumb(pages)
nav.breadcrumb
ol.breadcrumb__list(itemscope itemtype='http://schema.org/BreadcrumbList')
each item, index in pages
li.breadcrumb__list-item(itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem')
if index != pages.length - 1
a.breadcrumb__item(href="#0")
span(itemprop="name")= item
span.breadcrumb__separator /
meta(itemprop='position' content=(index + 1))
@antlis
antlis / ga-html5boilerplate.pug
Last active August 21, 2019 03:39
Google analytics pug mixin, HTML5 boilerplate like
mixin ga(id)
//- Pass your ga id, as attribute, eg. +ga('yourid12345')
script.
window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;
ga('create', '!{id}', 'auto'); ga('set','transport','beacon'); ga('send', 'pageview')
script(src='https://www.google-analytics.com/analytics.js')
@antlis
antlis / svg-icon.pug
Created August 15, 2019 10:21
Pug mixin that will output svg icon, in case you use svg sprites
mixin svgIcon(iconId)
i(class="icon icon--"+iconId)
svg.icon__svg
use(xlink:href='#'+iconId)
@antlis
antlis / ga-2019.pug
Created August 16, 2019 09:51
GTAG Script 2019, pug mixin
mixin ga(id)
script(async='', src='https://www.googletagmanager.com/gtag/js?id='+id)
script.
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '!{id}')
const tree = {
value: 1,
children: [
{
value: 10,
children: [
{
value: 2,
},
],
[Desktop Entry]
Version=1.0
Name=Firefox Developer Edition
Comment=Firefox Developer Edition
Exec=/opt/firefox-dev/firefox
# Path=/opt/firefox-dev/firefox
Icon=/opt/firefox-dev/browser/chrome/icons/default/default128.png
Terminal=false
Type=Application
Categories=Browser;Development;
@antlis
antlis / wtf.sh
Created April 16, 2026 19:52
A small shell utility for interactively switching between Git worktrees using fzf. It displays available worktrees, allows fuzzy selection, and checks out the corresponding branch instantly. Ideal for workflows that rely heavily on git worktree.
wtf() {
local selected
selected=$(wt list | fzf --ansi --header "Select worktree" --header-lines=1)
if [[ -n "$selected" ]]; then
local branch
branch=$(echo "$selected" | awk '{print $2}')
wt switch "$branch"
fi
}
@antlis
antlis / gist-copy.sh
Created April 16, 2026 19:54
Interactive GitHub Gist picker that copies content to clipboard. Uses the GitHub CLI (gh) and fzf to list your gists, preview them, and copy the selected gist’s raw content directly to the clipboard. Supports Linux (xclip) and macOS (pbcopy). Useful for quickly grabbing snippets without opening the browser.
gist-copy() {
gh gist list --limit 100 \
| fzf --preview 'gh gist view {1} --raw' \
| awk '{print $1}' \
| xargs gh gist view --raw \
| xclip -selection clipboard # Linux
# | pbcopy # macOS
}