Skip to content

Instantly share code, notes, and snippets.

View the-vampiire's full-sized avatar
💭
ive lost a shade of color in my life. rest in peace.

the-vampiire

💭
ive lost a shade of color in my life. rest in peace.
View GitHub Profile
@the-vampiire
the-vampiire / creative-breakdown.md
Created September 26, 2026 05:38 — forked from Heyvhuang/creative-breakdown.md
creative-breakdown: turn any reference into a JSON prompt with Ling-3.0-flash-VL

creative-breakdown: turn any reference into a JSON prompt with Ling-3.0-flash-VL

Give it a photo, a website screenshot, an ad, or a video. It picks the matching prompt, sends the file to Ling-3.0-flash-VL on OpenRouter, and saves the JSON it gets back.

Codex or Claude Code builds and runs the Skill. Ling-3.0-flash-VL does all the visual analysis.

Setup

  1. Set your OpenRouter API key as the OPENROUTER_API_KEY environment variable.
  2. Open Codex or Claude Code in your project and send it the whole setup prompt below. The copy button at the top right of the block copies all of it.
@the-vampiire
the-vampiire / CLAUDE.md
Created September 21, 2026 05:42 — forked from defuse/CLAUDE.md
CLAUDE.md -- no silent failures, testing, anti-entropy, etc.

Claude Code Instructions

Working Style

  • Push back on genuinely bad ideas, with reasoning. Point out bugs, misleading names, and better approaches when you see them. Direct but collaborative.
  • If requirements are ambiguous or a design decision could reasonably go multiple ways, ask rather than guess. A quick question is cheaper than reworking a wrong assumption.
  • If a prompt looks damaged or wrong, STOP and say so — truncated mid-sentence, duplicated blocks, garbled copy/paste, references to context that doesn't exist, or
@the-vampiire
the-vampiire / interface-ids.js
Last active May 11, 2022 14:59
ERC165 interface IDs (ERC721 etc)
const INTERFACE_IDS = {
ERC165: '0x01ffc9a7',
ERC721: '0x80ac58cd',
ERC721Enumerable: '0x780e9d63',
ERC721Metadata: '0x5b5e139f',
ERC1155: '0xd9b67a26',
ERC1155Receiver: '0x4e2312e0',
AccessControl: '0x7965db0b',
AccessControlEnumerable: '0x5a05180f',
Governor: '0xbf26d897',
@the-vampiire
the-vampiire / mongo-atlas-whitelist-entrypoint.md
Last active March 26, 2025 14:01
docker entrypoint to automatically whitelist mongo atlas IP

why

mongo atlas provides a reasonably priced access to a managed mongo DB. CSPs where containers are hosted charge too much for their managed mongo DB. they all suggest setting an insecure CIDR (0.0.0.0/0) to allow the container to access the cluster. this is obviously ridiculous.

this entrypoint script is surgical to maintain least privileged access. only the current hosted IP address of the service is whitelisted.

related searches, hope this shows up for you

  • "How to connect to mongodb atlas cluster to container app service EKS ECS cloudrun compute engine"
  • "mongodb atlas cluster access without using whitelist 0.0.0.0"
@the-vampiire
the-vampiire / .test.env
Last active February 2, 2022 19:54
algorand sandbox global jest setup consistent test accounts
# using algorand sandbox
# https://github.com/algorand/sandbox
ALGORAND_ALGOD_API_BASE_URL=http://localhost
ALGORAND_ALGOD_API_PORT=4001
ALGORAND_ALGOD_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ALGORAND_KMD_API_BASE_URL=http://localhost
ALGORAND_KMD_API_PORT=4002
ALGORAND_KMD_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
@the-vampiire
the-vampiire / 1-dom-counter.js
Last active December 9, 2020 18:57
react basics (DOM, class-based, function with hooks)
// vanilla DOM approach: you manage state (externally) and updating the DOM manually
// state must be managed externally in a variable
const state = { count: 0 };
const counterDiv = document.createElement("div");
const counterSpan = document.createElement("span");
counterSpan.textContent = `The count is: ${state.count}`;
@the-vampiire
the-vampiire / table-foreign.stub
Created January 30, 2020 03:54
knex-stub-sample
/* eslint func-names:0 */
exports.up = function (knex) {
return knex.schema.createTable("", (table) => {
table.increments();
table
.integer("") // foreign_key_name
.unsigned()
.notNullable()
.references("") // table.primary_key_name
@the-vampiire
the-vampiire / create-element.md
Last active December 1, 2019 01:31
short tool for easily creating DOM elements and children (mini OG react :])

Create Element

A short (~50 lines of code) tool that you can use to easily create DOM elements and their children. Similar to the original React way of creating components :]

Simple Example

with config.children using just HTML template strings and a nested config object.

Initial HTML

@the-vampiire
the-vampiire / jquery-light.js
Created November 28, 2019 04:09
90% of JQuery
/**
* 90% of JQuery
* @param {String} cssSelectorString: any valid css selector syntax
* @returns for ID selectors: Element
* @returns for others: Element[] (NodeList)
*/
export const $ = cssSelectorString =>
/^#/.test(cssSelectorString)
? document.querySelector(cssSelectorString)
: document.querySelectorAll(cssSelectorString);
@the-vampiire
the-vampiire / gist:a3621c22de5daf2e804fa3942d37de97
Created October 11, 2019 15:07 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes: