Skip to content

Instantly share code, notes, and snippets.

View timhudson's full-sized avatar

Tim Hudson timhudson

View GitHub Profile
@jsadoski-rockhall
jsadoski-rockhall / SKILL.md
Created January 30, 2026 13:33
Logging Best Practices Skill
name description
Logging Best Practices
Use before implementing logs in a medium to large scale production system.

This skill is adpated from "Logging sucks. And here's how to make it better. by Boris Tane.

When helping with logging, observability, or debugging strategies, follow these principles:

Core Philosophy

@eidam
eidam / rlimit-com-healthcheck-latency.js
Last active March 16, 2024 20:54
A Cloudflare GQL API request to get health checks RTT (round-trip time), grouped by region.
// GQL API docs => https://developers.cloudflare.com/analytics/graphql-api/
// tldr; => POST https://api.cloudflare.com/client/v4/graphql
const requestBody = {
query: `
query RequestsAndDataTransferByHostname($zoneTag: string, $filter: filter) {
viewer {
zones(filter: {zoneTag: $zoneTag}) {
healthCheckEventsAdaptiveGroups(limit: 10000, filter: $filter) {
dimensions {
@rauchg
rauchg / p.sh
Last active December 12, 2025 08:21
Perplexity CLI in pure shell
#!/usr/bin/env bash
function p() {
jq -n \
--arg content "$*" \
'{
"model": "pplx-7b-online",
"messages": [
{
"role": "system",
"content": "Be precise and concise."
@natew
natew / settings.json
Created August 10, 2023 23:54
my customize ui vscode
{
"apc.activityBar": {
"position": "bottom",
"hideSettings": true,
"size": 20
},
"apc.statusBar": {
"position": "editor-bottom",
"height": 22,
@WeirdConstructor
WeirdConstructor / RustAudioLinkCollection.md
Last active February 26, 2025 07:57
Rust Audio Link Collection

Weird Constructor's (slightly opinionated) Rust Audio Link Collection

@phil-blain
phil-blain / .gitattributes
Last active January 19, 2026 03:23
Git pickaxe : show only relevant hunks (filter displayed hunks using the given search string)
*.md diff=markdown

tweet-css

Smallest possible CSS-in-JS library.

@paulirish
paulirish / what-forces-layout.md
Last active February 11, 2026 15:03
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@gaearon
gaearon / ReduxUndoExample.js
Created July 30, 2015 14:46
Redux undo reducer factory example by @iclanzan
// Written by @iclanzan
// All credit goes to him!
// You create the reducer like this:
// var reducer = createTimelineReducer('someName', someReducer, ['foo', 'bar']);
// And then whenever an action of type `foo` or `bar` happens it calls `someReducer` and adds the result to the timeline.
// Then to undo/redo you trigger an action of type `someNameUndo`/`someNameRedo`.
var defaults = require('lodash/object/defaults');
var capitalize = require('lodash/string/capitalize');