Skip to content

Instantly share code, notes, and snippets.

View leecannon's full-sized avatar

Lee Cannon leecannon

View GitHub Profile
@leecannon
leecannon / untick-usermacro.js
Last active June 17, 2023 10:01
Confluence user macro to un-tick all tasks on the page - No Macro Body
## @noparams
<script type="text/javascript">
function untick() {
var base_url = window.location.protocol + "//" + window.location.host;
var tasklist_id = document.getElementsByClassName("inline-task-list")[0].dataset.inlineTasksContentId;
var boxes = document.getElementsByClassName("checked");
var number_of_boxes = boxes.length;
if (number_of_boxes == 0) return;
@leecannon
leecannon / std_log.md
Last active December 14, 2023 07:29
Quick overview of Zig's `std.log`

Out of date

This is an updated fork of this gist.

A simple overview of Zig's std.log

Logging functionality that supports:

  • If a log message should be printed is determined at comptime, meaning zero overhead for unprinted messages (so just leave the code peppered with debug logs, but when it makes sense scope them; so downstream users can filter them out)
  • Scoped log messages
  • Different log levels per scope
  • Overrideable log output (write to file, database, etc.)
@leecannon
leecannon / tick-usermacro.js
Last active July 26, 2022 09:53
Confluence user macro to tick all tasks on the page - No Macro Body
## @noparams
<script type="text/javascript">
function tick() {
var base_url = window.location.protocol + "//" + window.location.host;
var tasklist_id = document.getElementsByClassName("inline-task-list")[0].dataset.inlineTasksContentId;
var boxes = $("li[data-inline-task-id]").not(".checked");
var number_of_boxes = boxes.length;
if (number_of_boxes == 0) return;