Skip to content

Instantly share code, notes, and snippets.

View malcolmgreaves's full-sized avatar

Malcolm Greaves malcolmgreaves

View GitHub Profile
@malcolmgreaves
malcolmgreaves / ensemble-opinion.md
Created January 19, 2026 23:47 — forked from SilenNaihin/ensemble-opinion.md
Claude Code: Multi-model ensemble opinions (Claude + Gemini + Codex)
description
Get multi-model opinions on a problem (Claude + Gemini + Codex)

You are orchestrating an ensemble of AI models to analyze a problem from multiple angles.

Your Task

  1. Identify the problem from conversation context
  2. Run ALL THREE models in PARALLEL using the Task tool
@malcolmgreaves
malcolmgreaves / debug.md
Created January 19, 2026 23:46 — forked from SilenNaihin/debug.md
Claude Code: Debug command for systematic debugging

Debug

You are stuck on a thorny issue. Take your time. Be comprehensive—thoroughness beats speed here.

Your Approach

  1. Create hypotheses - List all possible causes for what's wrong. Don't jump to conclusions.
  2. Read all related code - Read ALL code that could be related. Take your time. Don't skim.
  3. Add strategic logging - Add console.log statements to verify your assumptions about what's actually happening.
  4. Ultrathink - Think step by step through the problem. Consider edge cases.
@malcolmgreaves
malcolmgreaves / transfer-context.md
Created January 19, 2026 23:42 — forked from SilenNaihin/transfer-context.md
Claude Code: Transfer Context command for new chat sessions

Transfer Context

Prepare context for a new chat session when this one is degraded or hitting limits.

Output Format

## Context Transfer

### Summary
@malcolmgreaves
malcolmgreaves / curl.md
Created December 11, 2024 20:24 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@malcolmgreaves
malcolmgreaves / fixed_thread_pool_executor.py
Created September 26, 2022 21:32 — forked from tliron/fixed_thread_pool_executor.py
Python fixed thread pool exuector
from threading import Thread, Lock
from Queue import Queue
import itertools, traceback, multiprocessing
class FixedThreadPoolExecutor(object):
"""
Executes tasks in a fixed thread pool.
Makes sure to gather all returned results and thrown exceptions in one place, in order of task
submission.
import torch
from torch_geometric.data import InMemoryDataset
class MyOwnDataset(InMemoryDataset):
def __init__(self, root, transform=None, pre_transform=None):
super(MyOwnDataset, self).__init__(root, transform, pre_transform)
self.data, self.slices = torch.load(self.processed_paths[0])
@property
import torch
from torch_geometric.data import InMemoryDataset
class MyOwnDataset(InMemoryDataset):
def __init__(self, root, transform=None, pre_transform=None):
super(MyOwnDataset, self).__init__(root, transform, pre_transform)
self.data, self.slices = torch.load(self.processed_paths[0])
@property
@malcolmgreaves
malcolmgreaves / osx-mongodb-rlimits-fix.md
Created July 16, 2020 20:51 — forked from tamitutor/osx-mongodb-rlimits-fix.md
Fix Mongodb "soft rlimits" Warning On Mac OS X (Yosemite)

If you are seeing Mongo soft rlimits warnings in your logs, or a WARNING: soft rlimits too low. Number of files is 256, should be at least 1000 when you login to mongo shell via mongo from the commandline, or any mysterious/unexplained mongo connection errors... follow this how-to exactly and it will resolve the issue for you.

(Source of this how to found at basho/basho_docs#1402)

First file: sudo vi /Library/LaunchDaemons/limit.maxfiles.plist

...containing:

@malcolmgreaves
malcolmgreaves / Search my gists.md
Created June 15, 2020 18:41 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@malcolmgreaves
malcolmgreaves / sshfs-gcp-instance-osx.md
Created April 1, 2020 04:44 — forked from mollymerp/sshfs-gcp-instance-osx.md
How to mount a GCP compute instance filesystem locally using `sshfs` on MacOS

How to mount a GCP compute instance filesystem locally using sshfs

This guide assumes that:

  • you already have an instance set up on GCP that you want to mount locally
  • the GCP CLI (gcloud) is installed on your local machine
  • you have authenticated locally to your google account gcloud auth login
  1. make sure your gcloud config is correct for the instance you're trying to access: