Skip to content

Instantly share code, notes, and snippets.

View hawkeye64's full-sized avatar

Jeff Galbraith hawkeye64

View GitHub Profile
@duyetpt
duyetpt / measure-software-simplicity.md
Last active September 11, 2026 22:12
Meansure software complexity
name measure-software-simplicity
description Measure and report how well a design, pull request, module, service, refactor, or repository follows software-simplicity principles such as Single Responsibility, deep modules, single knowledge ownership, low change amplification, low caller burden, valid-state design, actionable failures, controlled scope, and evidence-based performance work. Use for architecture assessments, code reviews, maintainability audits, refactoring baselines, before-and-after comparisons, and engineering quality reports.

Measure Software Simplicity

Assess simplicity with Goal-Question-Metric (GQM), repository evidence, and a calibrated scorecard. Treat measurements as decision support.

Rules

@aarondfrancis
aarondfrancis / audit-your-codebase.md
Created August 14, 2026 15:20
A read-only, agent-orchestrated codebase audit prompt for data structures, state modeling, algorithms, and ownership.

Audit this entire codebase for materially useful simplifications in its data structures, state representation, control flow, algorithms, and ownership.

This is an audit-only exercise. Do not edit files, run tests, implement recommendations, commit, or push. Read-only inspection commands are allowed.

You are the coordinator. Continue until the complete codebase has been reviewed and the final audit is validated.

  1. Establish the coverage contract

Inspect the repository and inventory every identifiable subsystem.

@IlCallo
IlCallo / injector-factory.ts
Last active January 17, 2022 14:56
Create an injection key and helper function based on a name and an interface describing the injected data. Automatically adds safeguard when the provided data cannot be found
import { inject, InjectionKey, provide } from 'vue';
function getValueFromMaybeFunction<
Args extends unknown[],
Provided,
T = Provided extends (...args: Args) => infer R ? R : Provided
>(params: Args, valueOrFn: Provided): T {
// TS isn't able to narrow down correctly `T | () => T` types as infer `ReturnType<Function>` as any
// See: https://github.com/microsoft/TypeScript/issues/37663
// See: https://github.com/microsoft/TypeScript/issues/37993#issuecomment-615369691
@IlCallo
IlCallo / move.ts
Last active March 14, 2024 16:21
Apply Drag and Drop to QTable rows using SortableJs
// Taken from https://github.com/angular/components/blob/master/src/cdk/drag-drop/drag-utils.ts
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
[
{
"currency": "Albania Lek",
"abbreviation": "ALL",
"symbol": "&#76;&#101;&#107;"
},
{
"currency": "Afghanistan Afghani",
"abbreviation": "AFN",
"symbol": "&#1547;"
@mihirk284
mihirk284 / Install_OpenCV4_CUDA10.md
Last active March 20, 2025 19:30 — forked from raulqf/Install_OpenCV4_CUDA12.6_CUDNN8.9.md
How to install OpenCV 4.4 with CUDA 11.3 in Ubuntu 20.04

How to install OpenCV 4.4.0 with CUDA 11.3 in Ubuntu distro 20.04

First of all install update and upgrade your system:

    sudo apt update
    sudo apt upgrade

Then, install required libraries:

@Artaud
Artaud / jobWorker.ts
Last active May 31, 2024 16:47
Basic worker thread pool in Feathers, using threads.js
import { expose } from "threads/worker"
const jobWorker = {
async doMyJob() {
console.log('Hello from worker thread!')
}
}
export type JobWorker = typeof jobWorker
expose(jobWorker)
import { inject, ref, provide } from '@vue/composition-api';
export function useAppBarProviders() {
const title = ref('');
function updateTitle(newTitle: string) {
title.value = newTitle;
}
provide('updateAppBarTitle', updateTitle);
@simibac
simibac / currencies.json
Last active December 2, 2025 09:35
global currencies as list and sql script (157 currencies)
[
{
"code": "EUR",
"name": "Euro",
"name_plural": "euros",
"symbol": "€",
"symbol_native": "€",
"decimal_digits": 2,
"rounding": 0
},
<template>
<q-dialog v-model="swDialog" persistent ref="myDialog" @show="onShow" @hide="onHide">
<q-card>
<q-bar class="bg-primary text-white" :class="draggable?'cursor-move':''">
<div class="text-h6">{{title}}</div>
<q-space />
<q-btn dense flat icon="close" v-close-popup />
</q-bar>
<slot></slot>
</q-card>