Skip to content

Instantly share code, notes, and snippets.

View valarpirai's full-sized avatar

Valar valarpirai

View GitHub Profile
@transitive-bullshit
transitive-bullshit / claude-code-prompts.js
Last active November 3, 2025 03:02
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
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active November 9, 2025 07:24
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@karpathy
karpathy / add_to_zshrc.sh
Created August 25, 2024 20:43
Git Commit Message AI
# -----------------------------------------------------------------------------
# AI-powered Git Commit Function
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It:
# 1) gets the current staged changed diff
# 2) sends them to an LLM to write the git commit message
# 3) allows you to easily accept, edit, regenerate, cancel
# But - just read and edit the code however you like
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/
gcm() {
@valarpirai
valarpirai / app_config.rb
Last active January 31, 2022 11:48
Load configs from ERB based YML files in Rails application
module AppConfig
def self._config
@_config ||= ErbYaml.load_file("#{Rails.root}/config/app_configuration.yml")
end
def self.env
_config["env_name"]
end
end
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active October 24, 2025 01:17
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@valarpirai
valarpirai / git-pull.sh
Created December 17, 2018 05:53
Iterate over the git repositories in current directory and do git pull
find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "pull()
{
echo '--------- $(pwd)'
if [ -d \".git\" ]; then
echo '######### Start git pull'
git pull
else
echo '********* Not a git Repo **********'
fi
}
@valarpirai
valarpirai / _upload_dir_s3.py
Last active November 16, 2019 12:13
Upload Directory to AWS S3 using boto3 python SDK. Files will be uploaded if last modified time newer than existing file. Also sets file MIME type.
#!/usr/bin/env python
import os
import sys
import boto3
from datetime import datetime, timezone
from urllib.request import pathname2url
import mimetypes
# upload_dir_s3.py /path/to/local/folder thebucketname /path/to/s3/folder
@troyfontaine
troyfontaine / 1-setup.md
Last active November 2, 2025 07:08
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active July 15, 2024 05:12
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution