Skip to content

Instantly share code, notes, and snippets.

View hsyntax's full-sized avatar

Harish Subramanium hsyntax

View GitHub Profile
@hsyntax
hsyntax / README.md
Last active August 5, 2026 20:02
A Bash command and installer for opening uncommitted changes, commits, pull requests, and branch diffs in Diffdump

Diffdump CLI

Install or update ddd with:

curl -fsSL https://diffdump.com/install | bash

The checksum-verifying installer places ddd in ~/.local/bin, adds that directory to your login shell's profile when necessary, and creates the ddc,

@hsyntax
hsyntax / sync-repos.ts
Last active August 28, 2026 02:41
Script to vendor open-source repos in your codebase. Works off-of `pnpm-lock.yaml`
import { execFile } from 'node:child_process'
import { existsSync, mkdirSync, readFileSync } from 'node:fs'
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { promisify } from 'node:util'
import { parse } from 'yaml'
type RepositoryPackage = {
readonly packageDirectory: string
readonly packageName: string
@hsyntax
hsyntax / gist:81728f6ccade69cdf24421b5468e1b59
Created July 3, 2026 18:57
De-slop loop - Claude auto-improve background loop
/loop once every two hours.
!git reset --hard && git checkout dev && git pull && pnpm i && pnpm build
Study across all backend apps and packages and identify opportunities to improve the code.
Look to :
- simplify code
- reduce verbosity
- improve conciseness
@hsyntax
hsyntax / ralph.sh
Created May 21, 2026 03:17
Codex ralph loop - expects a prd.md, and issues.md. Use https://github.com/mattpocock/skills/tree/main/skills/engineering to generate
#!/usr/bin/env bash
# ralph.sh
# Usage: ./ralph.sh <iterations|review>
set -e
if [ -z "$1" ]; then
echo "Usage: $0 <iterations|review>"
exit 1
fi
name freckle-cli
description Use the `freckle` CLI when asked to do anything related to Freckle, list or dataset building, GTM enrichment or workflows.

When freckle is referenced, always use the freckle CLI.

IMPORTANT: Interview me relentlessly about every aspect of the request until we reach a shared understanding. For each question, provide your recommended answer.

Rules

Keybase proof

I hereby claim:

  • I am hsubra89 on github.
  • I am hsubra89 (https://keybase.io/hsubra89) on keybase.
  • I have a public key ASAiMU3u6GAuRHRSby5JkE5zjLipWEwUmSDIEDujZKAXago

To claim this, I am signing this object:

@hsyntax
hsyntax / index.html
Last active October 26, 2015 00:19
Gist to demonstrate the back navigation bug in @cycle/history
<html>
<body>
<script src="./test-app.js"></script>
</body>
</html>
@hsyntax
hsyntax / cb -> promise
Created August 18, 2014 05:01
Converting Callback style code to promises
var q = require('q');
// Sample Async Function
function asyncFunction(data, cb) {
setTimeout(function() {
// call cb with error
cb(new Error('Error'));
// Or call with success
cb(null, {status: 'true'});
}, 100);
@hsyntax
hsyntax / promises
Created August 13, 2014 05:00
Promises Example 2
var allTheXmlsYay = [];
function getXML(url) {
var d = $q.defer();
d3.xml(url, 'image/svg+xml' function(xml) {
// If error variable is present
// if(err) d.reject(err);
d.resolve(xml);
@hsyntax
hsyntax / javascript async
Created August 11, 2014 04:10
async adding javascript
var addScript = function(url,success){
var script = document.createElement('script');
script.src = url;
var head = document.getElementsByTagName('head')[0], done=false;
script.onload = script.onreadystatechange = function(){
if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
done=true;
success();