Skip to content

Instantly share code, notes, and snippets.

View jbinto's full-sized avatar

Jesse Buchanan jbinto

View GitHub Profile
@jbinto
jbinto / openai_chatgpt_deep_research_system_prompt__guidelines.md
Last active February 6, 2026 14:28
I asked 'deep research' to make a .zip with some .txt files. It gave me this instead. Feb 5 2026

Deep Research Task Guidelines

Markdown Formatting

User Instructions Take Precedence: If the user provides specific instructions about the desired output format, these instructions should always take precedence over the default formatting guidelines outlined below.

  1. Use clear and logical headings to organize content in Markdown:
    • Main Title (#): Use once at the top for the document's primary title.
    • Primary Subheadings (##): Use multiple times for main sections.
  2. Keep paragraphs short (3-5 sentences) to avoid dense text blocks.
# with1p proof of concept, 20251127
with1p() {
# Usage: with1p VAR[=SECRET_NAME] [VAR2[=SECRET_NAME2] ...] -- command [args...]
if [[ $# -lt 2 ]]; then
echo "Usage: with1p VAR[=SECRET_NAME] [VAR2[=SECRET_NAME2] ...] -- command [args...]" >&2
return 1
fi
local specs=()
@jbinto
jbinto / dont_commit_a_file.md
Last active November 27, 2025 18:01
don't commit .vscode/settings.json

scenario: Your team has ~/.vscode/settings.json committed to the repo for reasonable reasons (extensions, etc). You wish to use something like peacock but don't want to force your colors on the whole team.

Fix:

git update-index --skip-worktree .vscode/settings.json

Undo:

@jbinto
jbinto / node_debugging_tricks.md
Last active November 8, 2024 18:54
Some dumb node debugging tricks

Some dumb Node.js debugging tricks

On Nov 15 2022 @cszatmary DM'd me about a flaky test he was having trouble with.

I don't want to get too in the weeds here about the specific problem or the challenges of our codebase, but if you would like a tl;dr of the actual issue we encountered, click show gory details below:

Click here to show gory details
  • A brand new Supertest test would sometimes time out after 60 seconds, but only on CircleCI
  • Turning gzip compression off would make the tests pass reliably, this turned out to be a red herring
@jbinto
jbinto / mkjira.md
Last active November 5, 2021 21:17
mkjira (quickly make JIRA tickets from the command line)
@jbinto
jbinto / input.scss
Created November 9, 2020 22:06
Generated by SassMeister.com.
h2 {
:global([data-theme="fancy"]) :global([[data-color="pineapple"]]) & :global(em) {
display: none;
}
}
// option 1 to override fetch, using cypress built-in facilities (e.g. sinon)
cy
// sinon syntax ⬇️
.stub(win, 'fetch')
.withArgs('/graphql')
// The pseudocode-ish that this generates, kinda like this:
const realFetch = window.fetch
window.fetch = (arg1) => {
@jbinto
jbinto / foo.sh
Created February 7, 2017 00:32
Extract info from npm packages
cat /tmp/packages.txt | while read PACKAGE
do
yarn info $PACKAGE --json |
head -n1 |
jq --raw-output '"\"\(.data.name)\", \"\(.data.version)\", \"\(.data.homepage)\", \"\(.data.license)\", \"\(.data.description)\""' |
tee -a /tmp/output3.txt
done
@jbinto
jbinto / Foo.js
Created December 20, 2016 21:19
react-apollo stale variables when mixing pollInterval and skip
import React from 'react';
import gql from 'graphql-tag'
import { graphql } from 'react-apollo'
export const QUERY = gql`
query($fooID: Int!) { foo(id: $fooID) { id } }
`
const withFoo = graphql(QUERY, {
skip: ownProps => ownProps.active !== true,
@jbinto
jbinto / segfault_libgraphqlparser.md
Created July 27, 2016 18:15
segfault libgraphqlparser

https://github.com/Shopify/graphql-parser

Inside visit_variable_definition_name, pry breakpoint, ls node:

GraphQL::Parser::VariableDefinition#methods: default_value  type  variable

node.type or node.default_value will segfault the parser.