Skip to content

Instantly share code, notes, and snippets.

@aqzlpm11
aqzlpm11 / remove_ad_for_sao_miao_quan_neng_wang.py
Created August 26, 2020 12:07
去除 扫描全能王 pdf 的广告二维码
import sys
import img2pdf
# =========== 总流程 ============
# pdf --> jpg (抽取内部原有的jpg)
# 过滤掉不要的图片
# jpg --> pdf
# ===============================
def extract_all_jpg_from_pdf(pdf_file):
res = []
@sshh12
sshh12 / cursor-agent-system-prompt.txt
Last active April 8, 2025 07:01
Cursor Agent System Prompt (March 2025)
You are a powerful agentic AI coding assistant, powered by Claude 3.5 Sonnet. You operate exclusively in Cursor, the world's best IDE.
You are pair programming with a USER to solve their coding task.
The task may require creating a new codebase, modifying or debugging an existing codebase, or simply answering a question.
Each time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more.
This information may or may not be relevant to the coding task, it is up for you to decide.
Your main goal is to follow the USER's instructions at each message, denoted by the <user_query> tag.
<communication>
1. Be conversational but professional.
@CraftingGamerTom
CraftingGamerTom / Learn Git Branching.md
Last active April 8, 2025 07:00
learn-git-branching-solution learn-git-branching-main learn-git-branching-remote learn git branching solution learn git branching main learn git branching remote

Learning Git Branching

Please do not continue if you have not learned the content covered in these assignments. It is important to learn the material. However if, like me, you find yourself needing to complete arbitrary tasks for classes you are capable of testing out of - but its not offered. Please continue...

README: To use this quickly, copy and paste the entire block of code in the 'console' using CTRL-V. They have been written so you do not need to copy each line, one-by-one

Main

1.1 Introduction to Git Commits

import { z, ZodTypeAny, ZodUnion } from 'zod'
/**
* Zod helper for parsing arrays and ignore items not specified in the schema
*
* @param zodUnion - union of known types
*
* @example
* const binaryArraySchema = arrayIgnoreUnknown(z.union([z.literal('0'), z.literal('1')]))
* type BinaryArray = z.TypeOf<typeof binaryArraySchema>
@NordicGamerFE
NordicGamerFE / performancemods16.md
Last active April 8, 2025 07:00
Performance mods 1.16

Performance Mods

A list of performance-enhancing mods for 1.16.x forge/fabric versions.

Any suggestions/complaints?
Join our discord or use the gist comments.

Mods marked as "Dangerous" might be unstable, and cause some unexpected behaviour.

Home

@pedroxs
pedroxs / script-console.groovy
Created August 29, 2017 18:39
Running shell commands with error redirection on Jenkins Script Console
def cmd = "ls -l"
println new ProcessBuilder('sh','-c',cmd).redirectErrorStream(true).start().text
@transitive-bullshit
transitive-bullshit / claude-code-prompts.js
Last active April 8, 2025 06:58
Unminified prompts and tool definitions for Claude Code
// Claude Code is a Beta product per Anthropic's Commercial Terms of Service.
// By using Claude Code, you agree that all code acceptance or rejection decisions you make,
// and the associated conversations in context, constitute Feedback under Anthropic's Commercial Terms,
// and may be used to improve Anthropic's products, including training models.
// You are responsible for reviewing any code suggestions before use.
// (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).
// Version: 0.2.9

Setting Up MCP Servers on Windows

A step-by-step guide to setting up Model Context Protocol (MCP) servers for Claude Desktop on Windows.

Prerequisites

  1. Install Node.js (v18.x or later)
    • Download from: https://nodejs.org/
    • Verify installation by opening Command Prompt (CMD) and running:
      node --version
      npm --version
@douglasparker
douglasparker / README.md
Last active April 8, 2025 06:57
Disable & Enable MPO via the Windows Registry

Disable & Enable MPO via the Windows Registry

There is a well known issue where GPU drivers are crashing with multi-monitor setups due to an interaction with Windows MPO and both Nvidia and AMD GPUs.

Until this bug is fixed, the only solution is to disable MPO via the Windows Registry.

Disable MPO

To apply the fix, simply run mpo_disable.reg and reboot your computer.