Skip to content

Instantly share code, notes, and snippets.

@fluffysquirrels
fluffysquirrels / argo-wf-filtering.user.js
Last active June 20, 2023 16:23
Greasemonkey Argo Workflows filtering script
// ==UserScript==
// @name Argo Workflows improvements
// @namespace https://github.com/fluffysquirrels
// @version 4.8
// @description Augments the Argo Workflows UI to improve navigating and viewing workflows.
// @run-at document-end
// @require https://unpkg.com/@popperjs/core@2
// @require https://gist.githubusercontent.com/fluffysquirrels/4683dee3421cee8a1cc32a2880323575/raw/tippy.js_6.3.7_tippy-bundle.umd.js
// @grant unsafeWindow
@fluffysquirrels
fluffysquirrels / github-statuses-increase-height.user.js
Last active May 7, 2023 01:24
GitHub checks increase height Greasemonkey script
// ==UserScript==
// @name GitHub statuses increase height
// @version 1
// @grant none
// @match https://github.com/*
// ==/UserScript==
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
@fluffysquirrels
fluffysquirrels / git-revert-time
Created April 9, 2023 16:15
Search a git branch log for revert commits, and output a csv file containing details of the revert commit, the commit that was reverted, and the time in seconds between the two.
#!/usr/bin/env bash
set -eu -o pipefail
# Set default values for unset variables
: ${OUT_DIR:="${HOME}/tmp/git-revert-time"}
: ${REMOTE:='origin'}
: ${BRANCH:='master'}
: ${SINCE:='2020-01-01'}
echo "Output and temp files will be written to ${OUT_DIR}"
@fluffysquirrels
fluffysquirrels / README.md
Last active August 26, 2021 16:10
Flexible mount for Raspberry Pi camera module on aluminium 2020 v-slot extrusion

Camera mount

This is a flexible mount for Raspberry Pi camera module on aluminium 2020 v-slot extrusion.

the layout is probably a bit confusing
at 0,0,0 there's an assembled camera mount including a simplified model of the camera itself
at -50, 0, 0 there's an assembled hinge
at 50, 0, 0 and around it are different pieces that i printed in print layout
i used ! to select the parts to print (cunningly concealed in module to_print) to export .stl's

all parts in to_print are in the orientation to print them

@fluffysquirrels
fluffysquirrels / org-mode-highlight-list-items-test-cases.org
Last active September 14, 2018 09:41
Emacs org mode highlight list item bullets WIP

List styles

Should match:

  • x
  • x
    • x
  1. x
  2. x
  3. x
  4. x
@fluffysquirrels
fluffysquirrels / BufferedResponseWriter.go
Created April 5, 2015 01:53
BufferedResponseWriter
package webutil
import (
"bufio"
"bytes"
"net"
"net/http"
)
type BufferedResponseWriter struct {
@fluffysquirrels
fluffysquirrels / cmd_infrastructure.go
Last active August 29, 2015 14:15
Kingpin independent commands pattern
package main
import (
"fmt"
"github.com/alecthomas/kingpin"
)
type cmd struct {
*kingpin.CmdClause
@fluffysquirrels
fluffysquirrels / copy-tail
Created February 19, 2015 13:12
Script to incrementally copy the end of a local file to a destination over SSH
usage() {
cat <<EOF
Usage:
copy-tail SOURCE_PATH REMOTE_HOST REMOTE_PATH
EOF
}
if [ "$#" -ne "3" ]; then
echo "Wrong number of arguments!"