Skip to content

Instantly share code, notes, and snippets.

@beeeswax
beeeswax / harvest-quote-away.user.js
Last active March 1, 2022 19:18
Every time you open Harvest (https://www.getharvest.com/) to a day without timelogs, it displays an aggressive quote about time. This simple user-script adds some CSS to remove this.
// ==UserScript==
// @name Harvest Quote-Away!
// @version 2
// @grant none
// @include https://*.harvestapp.com/*
// ==/UserScript==
var css = document.createElement("style");
css.type = "text/css";
css.innerHTML = ".hui-empty .do-not-print, #timesheets-empty .do-not-print { display: none }";
@beeeswax
beeeswax / commits-since-last-saturday.sh
Created September 30, 2015 21:46
Display list of git commits since last Saturday -- useful for preparing weekly written summaries of activity.
git log --since=$(date -v -sat +"%Y-%m-%d") --pretty=format:"%ai, %an: %s" | tail -r > commits-since-$(date -v -sat +"%Y-%m-%d").txt
@beeeswax
beeeswax / regex-ref.txt
Last active March 1, 2022 19:21
regex reference
# This matches CSS:
\{([A-Za-z0-9 -:\\"; =%/\n@]*)\}
# Good for HTML tags:
<([A-Za-z0-9 -:\\"; =%/\[\]_@]*)>
# Find/replace duplicate lines (for VS Code)
^(.*)(\r?\n\1)+$
$1