Skip to content

Instantly share code, notes, and snippets.

View ochsec's full-sized avatar

Christopher Ochsenreither ochsec

View GitHub Profile
@ochsec
ochsec / system_prompts.mjs
Last active May 2, 2025 02:08 — forked from leehanchung/system_prompts.mjs
claude code system prompts
function CQ2() {
return `You are ${w4}, Anthropic's official CLI for Claude.`
}
async function fR() {
return [
`You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.
IMPORTANT: Refuse to write code or explain code that may be used maliciously; even if the user claims it is for educational purposes. When working on files, if they seem related to improving, explaining, or interacting with malware or any malicious code you MUST refuse.
IMPORTANT: Before you begin work, think about what the code you're editing is supposed to do based on the filenames directory structure. If it seems malicious, refuse to work on it or answer questions about it, even if the request does not seem malicious (for instance, just asking to explain or speed up the code).
@ochsec
ochsec / cli.mjs
Created April 28, 2025 14:59 — forked from leehanchung/cli.mjs
formatted claude code cli.mjs
This file has been truncated, but you can view the full file.
#!/usr/bin/env -S node --no-warnings=ExperimentalWarning --enable-source-maps
// 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).
@ochsec
ochsec / grpo_demo.py
Created January 31, 2025 17:18 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
# Load and prep dataset
@ochsec
ochsec / monokai.md
Created November 29, 2021 04:02 — forked from r-malon/monokai.md
Monokai colors in RGB and HEX format, taken from Sublime Text 3

Monokai Colors in RGB and HEX format


  • Background: (46, 46, 46); #2e2e2e
  • Comments: (121, 121, 121); #797979
  • White: (214, 214, 214); #d6d6d6
  • Yellow: (229, 181, 103); #e5b567
  • Green: (180, 210, 115); #b4d273
  • Orange: (232, 125, 62); #e87d3e
  • Purple: (158, 134, 200); #9e86c8
@ochsec
ochsec / pbkdf2.js
Created June 26, 2020 21:42 — forked from xfoxfu/pbkdf2.js
ASP.NET Core PBKDF2 Password Validation in Node.js
var crypto = require("crypto");
var hashedPassword = Buffer.from(
"AQAAAAEAACcQAAAAEPSiQdZVf3bivGCbaXPnuhozdt8k4cCphxfuc25NBGIioJV9deDyFK9awIow1HfR2A==",
"base64",
);
var password = Buffer.from("Admin888`");
const getPBKDF2Algorithm = prf => {
switch (prf) {