Skip to content

Instantly share code, notes, and snippets.

View output
eval `go build -work -a 2>&1` && find $WORK -type f -name "*.a" | xargs -I{} du -hxs "{}" | gsort -rh | sed -e s:${WORK}/::g


Static files and 404 pages.

{{ mkdir "build" }}
{{ copy "static/*" "build" }}
{{ render "404" | write "build/404.html" }}
View input.go
// grab time spent
sum := Agg("duration_sum", Sum("duration"))
// grab time spent per label
labels := Agg("labels",
Terms("issue.labels.keyword", 100),
// grab time spent per day, and per label
View preact.go
// Package preact provides bindings to the preact library.
package preact
import ""
var preact = js.Global.Get("preact")
// Attrs of an element.
type Attrs map[string]interface{}
View status.html
{{ define "content" }}
{{ partial "back" (dict "url" "//") }}
<section class="Content full center">
<div class="Container small">
<div class="Title center margin">
<span class="text">Status</span>
<span class="subtext">Apex service status.</span>
View images.css
.Images.three {
--size: 450px;
--size-ratio: .75;
--size-small: calc(var(--size) * var(--size-ratio));
--inset: 150px;
--bottom: 25px;
display: flex;
justify-content: center;
align-items: flex-end;
View main.go
package main
import (
tj / Makefile
Last active Mar 11, 2017
imgix favicons
View Makefile
# Imgix image replacement.
@echo "==> pointing images to $(IMAGE_CDN)"
@find build -type f -name "*.html" | xargs sed -i '' 's|src="/images|src="$(IMAGE_CDN)/images|g'
@find build -type f -name "*.html" | xargs sed -i '' 's|href="/images|href="$(IMAGE_CDN)/images|g'
.PHONY: images
show_icons() {
defaults write CreateDesktop true
killall Finder
hide_icons() {
defaults write CreateDesktop false
killall Finder
You can’t perform that action at this time.