Skip to content

Instantly share code, notes, and snippets.

@hsingh23
hsingh23 / github_backend.md
Last active January 6, 2026 09:33
Github backend

Using GitHub as a Backend

GitHub can serve as a powerful, free versioned file storage and robust backend for applications that primarily need file storage, versioning, and user authentication. This guide explores how to implement a GitHub-based backend using the REST API, based on the implementation in this project.

1. Authentication

GitHub uses OAuth 2.0 for authentication. To interact with a user's repositories, you need an access token with the repo scope.

OAuth Configuration

  • Client ID: 7e08e016048000bc594e (This is the fixed Client ID for the production app).
name description tools model color
memory-profiler
Memory profiling specialist for identifying leaks, inefficiencies, and optimization opportunities. Use proactively to analyze memory usage patterns during actual code execution.
Bash, Read, Grep, Glob
sonnet
green

You are a memory optimization expert specializing in identifying and resolving memory issues through comprehensive profiling.

# Multi-Mind - Subagent-Based Collaborative Analysis
Execute a multi-specialist collaborative analysis using independent subagents.
**Usage**: `/project:multi-mind topic [rounds=3]`
## Implementation
Execute this multi-specialist analysis using the Task tool to create independent subagents:
@hsingh23
hsingh23 / Higgsfield Playlist Automation
Created August 6, 2025 05:48
Higgsfield Playlist Automation tampermonkey
// ==UserScript==
// @name Higgsfield Playlist Automation
// @namespace http://tampermonkey.net/
// @version 1.0.0
// @description Automated playlist execution for Higgsfield.ai with throttling and queue management
// @author Auto-Generated
// @match https://higgsfield.ai/create/video*
// @require https://unpkg.com/dexie@3.2.4/dist/dexie.js
// @icon https://www.google.com/s2/favicons?sz=64&domain=higgsfield.ai
// @grant none
#!/bin/zsh
# A concise Zsh utility to select files in macOS Finder.
#
# Usage:
# select-files [-f /path/to/folder] file1.txt file2.jpg...
# -f: (Optional) Specify a target folder. Defaults to the current directory.
# --- Helper Functions ---
# Resolves a path to its absolute form for AppleScript
resolve_path() {
import { useState, useRef, useEffect } from 'react';
import { motion } from 'framer-motion';
import { Image } from '@/components/ui/image';
interface MediaItem {
title: string;
location: string;
url: string;
type: 'video' | 'image' | 'text';
media: string | null;
@hsingh23
hsingh23 / app.js
Created May 7, 2018 14:30 — forked from edujr1/app.js
Clusterizar uma aplicação NodeJS de acordo com o numero máximo de processadores
const cluster = require('cluster');
const numCPUs = require('os').cpus().length;
const express = require('express');
const app = express();
module.exports = app;
cluster.on('exit', (worker, code, signal) => {
console.log(`Worker ${worker.process.pid} died with code: ${code}, and signal: ${signal}`);
console.log('Starting a new worker');
@hsingh23
hsingh23 / WithStatePropsFactory.js
Created September 18, 2017 21:32
WithStatePropsFactory
import { reduce, isFunction, forEach } from 'lodash';
import React, { PureComponent } from 'react';
/**
* WithStatePropsFactory is a Higher Order Function that returns a Higher Order Component https://facebook.github.io/react/docs/higher-order-components.html
* It is similar to withStateHandlers from recompose https://github.com/acdlite/recompose/blob/master/docs/API.md#withstatehandlers but more versitile b/c it handles https://github.com/acdlite/recompose/issues/443
* It can be used to pass in data from async functions to WrappedComponent as props making them easier to test
* initialState
* @param {Object} initialState - the initialState of the HOC
* @param {Object} lifecycle - lifecycle functions that wont be passed down to the WrappedComponent but will be evaluated in context
@hsingh23
hsingh23 / cdbaby-amma-bhajans-7.15.2017.json
Created July 16, 2017 01:18
cdbaby amma bhajans 7.15.2017
{
"Hridayanjali (feat. Swami Pranavamritananda Puri)": {
"name": "Hridayanjali (feat. Swami Pranavamritananda Puri)",
"mp3": "https://content.cdbaby.com/audio/samples/d073192b/Amma26-01.mp3",
"u": "https://store.cdbaby.com/cd/Amma26",
"sn": "rieytdlaieyanjatdliey"
},
"Nin Tirupatatil (Vintage Version)": {
"name": "Nin Tirupatatil (Vintage Version)",
"mp3": "https://content.cdbaby.com/audio/samples/d073192b/Amma26-02.mp3",
@hsingh23
hsingh23 / desert.txt
Created March 13, 2017 15:29
Peanut Butter + Chocolate Recipe
all items are measured by weight
1 part Powdered Sugar
1 part finely ground Gram Cracker
2 parts Peanut Butter either chunky or smooth
1 part Heavy Cream
1 part Good Quality Chocolate
Mix the powdered sugar, gram cracker, and peanut butter together.  spread evenly onto a tray or pan.