Skip to content

Instantly share code, notes, and snippets.

@sshh12
sshh12 / cursor-agent-system-prompt.txt
Last active March 21, 2025 07:21
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.
@573
573 / readme.md
Last active March 21, 2025 07:19
home-manager and related nix-configs

First and foremost the manual mentions it explicitly:

[Use] the standalone home-manager tool. For platforms other than NixOS (...), this is the only available choice. (...) See Section 1.1, “Standalone installation” for instructions (...)

https://grahamc.com/blog/erase-your-darlings
https://github.com/ryantm/home-manager-template
ico nix-store sqlite corruption NixOS/nix#1353
ico nix-store permission error NixOS/nix#4356
https://rgoswami.me/posts/local-nix-no-root/
https://dram.page/p/bootstrapping-nix/

#notes
https://www.cnblogs.com/keepmoving1113/tag/OSCP/
https://hausec.com/pentesting-cheatsheet/
https://highon.coffee/blog/penetration-testing-tools-cheat-sheet
https://github.com/wwong99/pentest-notes/blob/master/oscp_resources/OSCP-Survival-Guide.md
https://noobsec.net/oscp-cheatsheet/
https://www.netsecfocus.com/oscp/2019/03/29/The_Journey_to_Try_Harder-_TJNulls_Preparation_Guide_for_PWK_OSCP.html
https://www.reddit.com/r/oscp/comments/824v7z/oscp_exam_taking_fraud/
https://github.com/OlivierLaflamme/Cheatsheet-God
https://johntuyen.com/personal/2019/05/25/personal-oscpcheatsheet.html
@pablotolentino
pablotolentino / Visual Studio 2022 Product Key
Created November 20, 2021 20:41
Visual Studio 2022 Enterprise Product key
Visual Studio 2022
Enterprise :
VHF9H-NXBBB-638P6-6JHCY-88JWH
Professional:
TD244-P4NB7-YQ6XK-Y8MMM-YWV2J
@ninehills
ninehills / zerorpc.md
Created June 18, 2013 12:17
ZeroRPC简介 - 轻量级分布式通信框架

ZeroRPC简介 - 轻量级分布式通信框架

概述

分布式系统的核心是分布式通信,而传统上开发一套支持上千台规模集群,可靠性非常高的分布式通信框架,需要不少的精力投入。而在多数情景下,我们(特别是时间宝贵的OP)并不是非常关注技术实现的细节,而是希望有一套成熟、轻量、可靠性高、使用方便而且易于调试的分布式通信框架,可以直接使用,从而把时间放在具体业务逻辑上。

在PyCon 2012大会上,dotcloud公司开源了一套基于ZeroMQ和MessagePack的分布式通信框架(或者说是协议+Python实现)。该框架因为基于ZeroMQ,使用方法是RPC,所以被命名为ZeroRPC。ZeroRPC的特点在其官网的介绍中一目了然[1]:

ZeroRPC is a light-weight, reliable and language-agnostic library for distributed communication between server-side processes.

@t3dotgg
t3dotgg / try-catch.ts
Last active March 21, 2025 07:13
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active March 21, 2025 07:13
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@phizaz
phizaz / async.py
Last active March 21, 2025 07:11
Python turn sync functions to async (and async to sync)
import functools
def force_async(fn):
'''
turns a sync function to async function using threads
'''
from concurrent.futures import ThreadPoolExecutor
import asyncio
pool = ThreadPoolExecutor()
@K1ethoang
K1ethoang / Active StarUml version 6 for Window | MacOS | Linux.md
Last active March 21, 2025 07:11
Active StarUml version 6 for Window | MacOS | Linux
@davebarnwell
davebarnwell / brew-dnsmasq.md
Last active March 21, 2025 07:10
install dnsmasq with brew

Install dnsmasq and configure for *.dev.local domains

$ brew install dnsmasq
$ vim /usr/local/etc/dnsmasq.conf

Reload configuration and clear cache

# Copy the daemon configuration file into place.
$ sudo cp $(brew list dnsmasq | grep /homebrew.mxcl.dnsmasq.plist$) /Library/LaunchDaemons/

$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist