Skip to content

Instantly share code, notes, and snippets.

View Orphist's full-sized avatar
🏠
Working from home

Max Surkov Orphist

🏠
Working from home
View GitHub Profile
@Orphist
Orphist / Code.gs
Created September 2, 2025 17:30 — forked from nobilix/Code.gs
=LLM() formula for Google Sheets using OpenRouter
// Constants at file root for global access
const API_KEY = "your_openrouter_api_key"; // Replace with your OpenRouter API key
const MODEL = "google/gemini-2.5-pro-exp-03-25:free";
const SYSTEM_PROMPT = `You are a helpful assistant that provides concise, accurate responses.
When given data from a spreadsheet, analyze it thoroughly and provide insights that are relevant to the user's prompt.
Be direct and focus on the most important information.`;
/**
* Creates a custom Google Sheets function that makes LLM completion requests via OpenRouter.
*
@Orphist
Orphist / claude-code-tools.md
Created August 24, 2025 17:03 — forked from wong2/claude-code-tools.md
Tools and system prompt of Claude Code

Task

Launch a new agent that has access to the following tools: Bash, Glob, Grep, LS, exit_plan_mode, Read, Edit, MultiEdit, Write, NotebookRead, NotebookEdit, WebFetch, TodoRead, TodoWrite, WebSearch. When you are searching for a keyword or file and are not confident that you will find the right match in the first few tries, use the Agent tool to perform the search for you.

When to use the Agent tool:

  • If you are searching for a keyword like "config" or "logger", or for questions like "which file does X?", the Agent tool is strongly recommended

When NOT to use the Agent tool:

  • If you want to read a specific file path, use the Read or Glob tool instead of the Agent tool, to find the match more quickly
  • If you are searching for a specific class definition like "class Foo", use the Glob tool instead, to find the match more quickly
  • If you are searching for code within a specific file or set of 2-3 files, use the Read tool instead of the Agent tool, to find the match more quickly
@Orphist
Orphist / advisors.md
Created August 24, 2025 13:56 — forked from uthunderbird/advisors.md
Advisors workflow example

Writing Advisors

Core Concept

Writing advisors are different "voices" in the author's mind, similar to Disco Elysium's character aspects. Each advisor represents a specific thinking aspect that helps examine text from different angles.

Key Principles

  • User initiates communication by asking questions
  • Editor coordinates all discussions and makes final decisions
  • Each advisor starts with: > **Name**: Message
  • Every criticism must include a specific improvement suggestion
@Orphist
Orphist / README.md
Created June 3, 2025 13:50 — forked from gettalong/README.md
HexaPDF examples

HexaPDF - A Versatile PDF Creation and Manipulation Library For Ruby

HexaPDF is a pure Ruby library with an accompanying application for working with PDF files. In short, it allows

  • creating new PDF files,
  • manipulating existing PDF files,
  • merging multiple PDF files into one,
  • extracting meta information, text, images and files from PDF files,
  • securing PDF files by encrypting them and
  • optimizing PDF files for smaller file size or other criteria.
@Orphist
Orphist / README.md
Created April 25, 2025 13:12 — forked from jplew/README.md
How to Setup SSH and GPG keys with Gitlab
Begin by enclosing all thoughts within <thinking> tags, exploring multiple angles and approaches.
Break down the solution into clear steps within <step> tags. Start with a 20-step budget, requesting more for complex problems if needed.
Use <count> tags after each step to show the remaining budget. Stop when reaching 0.
Continuously adjust your reasoning based on intermediate results and reflections, adapting your strategy as you progress.
Regularly evaluate progress using <reflection> tags. Be critical and honest about your reasoning process.
Assign a quality score between 0.0 and 1.0 using <reward> tags after each reflection. Use this to guide your approach:
0.8+: Continue current approach
0.5-0.7: Consider minor adjustments
Below 0.5: Seriously consider backtracking and trying a different approach
@Orphist
Orphist / turing.json
Created October 7, 2023 07:21 — forked from dipu-bd/turing.json
JSON schema for a Turing complete machine
{
"$schema": "http://json-schema.org/schema",
"title": "JSON schema for a turing complete machine",
"type": "object",
"definitions": {
"statement": {
"description": "",
"type": "object",
@Orphist
Orphist / java_download.sh
Created August 8, 2023 04:01 — forked from wavezhang/java_download.sh
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@Orphist
Orphist / multi.rb
Created April 25, 2023 18:47 — forked from davidbalbert/multi.rb
Generic functions in Ruby
# Generic functions in Ruby
#
# How to use it:
#
# plus = Multi.new
# plus.add_method(Numeric, Numeric) { |a, bi| a + b }
# plus.call(1, 2) #=> 3
#
# For some more fun:
#