Skip to content

Instantly share code, notes, and snippets.

@gardner
gardner / grant_research_dify.md
Last active February 10, 2025 07:16
A dify bot doing grant research

Grants and Funding for not-for-profit organizations in New Zealand

Exploring Government Grants for New Zealand Nonprofits

Research Report: Government Grants for New Zealand Nonprofits
  1. Overview of Government Funding Sources
  • Primary funding provider: Department of Internal Affairs' Community Operations
  • Funding programs include:
    • Lottery grants
  • Crown grant funding
@gardner
gardner / grant_research.md
Created February 10, 2025 03:50
Grant Research

Funding Opportunities for Community-Based Education Organizations in Nelson, New Zealand

Date: 07/02/2025

Introduction

Community-based education organizations in Nelson, New Zealand, play a crucial role in fostering educational development and social cohesion. These organizations often rely on external funding to sustain their operations and expand their impact. In recent years, a variety of funding opportunities have emerged, ranging from traditional grants provided by local councils and foundations to innovative funding mechanisms such as cryptocurrency and blockchain-based solutions. The Nelson City Council's Community Investment Fund (CIF) is a notable example, offering financial support to projects that align with the city's social development goals (Nelson City Council). Additionally, the Rātā Foundation provides significant funding across the South Island, focusing on ed

@gardner
gardner / cweb_folder_action.sh
Created August 6, 2024 05:03
A macOS folder action that converts files to webp format
#!/usr/bin/env bash -x
export PATH="${PATH}:/opt/homebrew/bin"
for f in "$@"; do
ABSOLUTE_F=$(readlink -f "$f")
# Check if the file is an image
MIME_TYPE=$(file --mime-type -b "$ABSOLUTE_F")
EXT="${ABSOLUTE_F##*.}"
@gardner
gardner / gist:9760e52201ae9673f8b6c8935ee95619
Created December 1, 2023 11:05
Create "animated gif" mp4
ffmpeg -i demo.mov \
-vf "fps=5,scale=1280:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" \
-y demo.mp4
@gardner
gardner / gist:78721ccceaf9d341d9b27ae2ba1366ca
Created December 1, 2023 02:06
ffmpeg macos settings test for h264_videotoolbox
#!/bin/bash
for profile in baseline main high; do
for level in 30 31 32 40 41 42 50 51 52; do
echo output-$profile-$level.mp4
ffmpeg -i high-res.mov \
-c:v h264_videotoolbox -profile:v $profile -level $level \
-c:a aac \
-y \
output-$profile-$level.mp4
@gardner
gardner / jail.local
Created September 1, 2022 21:18
fail2ban with authelia
[authelia]
enabled = true
port = http,https,9091
filter = authelia
logpath = /var/log/authelia/authelia.log
maxretry = 3
bantime = 1d
findtime = 1d
chain = DOCKER-USER
@gardner
gardner / pre-push
Created January 15, 2022 00:33
Versioning a React app in a monorepo with no tags
#!/bin/sh
cd $(git rev-parse --show-toplevel)/ui
previous=$(npm version | grep rating-ui | awk -F"'" '{ print $4 }')
tickets=$(git log --oneline ./ | awk '{ print tolower($2) }' | sort | uniq | grep -i -E -o 'MX-[0-9]+' | wc | awk '{ print $1 }')
patch=$(($tickets % 10))
minor=$(($tickets % 100))
minor=${minor:0:1}
major=$(($tickets % 1000))
major=${major:0:1}
@gardner
gardner / nighthawk.sh
Created December 7, 2020 23:16
Get stats from Nighthawk M2 router
modelJson=''
get_value() {
val=$(echo $modelJson | grep "$1" | awk -F: ' { print $2 }' | sed 's/[,]//' | sed -e 's/^[[:space:]]//')
echo "${val//[^a-zA-Z0-9_ ]/}"
}
nighthawk() {
modelJson=$(curl -sL http://192.168.1.1/api/model.json)
rssi=$(get_value rssi)
battChargeLevel=$(get_value battChargeLevel)
@gardner
gardner / HOWTO-GARDNER.md
Last active January 10, 2024 22:59
How To Gardner

Communication

I want to ensure that communication is effective and doesn't interrupt deep focus. If you feel that I am communicating with you too frequently or about irrelevant topics, please let me know directly, and I'll take that into account for future communications.

Regarding email, I usually respond three times per day: in the morning before standup, midday before or after lunch, and in the evening before leaving (except on Fridays). If I use "reply-all," I expect someone in the "To:" field to respond unless the issue has already been addressed. It's okay to respond to these emails just to say who the best person is to answer the question. Everyone in the CC field is there to follow along, so please only move people to BCC after clearly announcing it in the email thread.

For chat, I'm generally signed in but will turn off notifications when on a call with someone or concentrating deeply. I believe in off-topic chat to build relationships and strengthen the organization's culture, so please invite

@gardner
gardner / debug.css
Created July 6, 2020 07:15
This is my favorite one
* { outline: solid 0.25rem hsla(210, 100%, 100%, 0.5); }