Skip to content

Instantly share code, notes, and snippets.

@cs50victor
cs50victor / cc-v2.1.34.json
Last active February 10, 2026 09:16
claude code v2.1.34 internals
{
"model": "claude-opus-4-6",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "<system-reminder>\nThe following skills are available for use with the Skill tool:\n\n- ....</system-reminder>"
},
@cs50victor
cs50victor / settings.json
Last active December 29, 2025 12:55
view, edit and and accept claude code diffs from your IDE
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "<YOUR_HOME>/.claude/scripts/zed-diff-post.py"
@cs50victor
cs50victor / cleanup.sh
Last active September 26, 2025 01:37
handy one-liner to free up space for typescript/rust/python developers
# handy one-liner to free up space for typescript/rust/python developers
cd ~/dev && for dir in */; do rm -rf "${dir}node_modules" "${dir}target" "${dir}.venv" "${dir}.next" 2>/dev/null; done
@cs50victor
cs50victor / Dockerfile
Created February 23, 2025 18:44
Dockerfile to enable vulkan using Nvidia on fly.io
FROM nvidia/cuda:12.2.2-base-ubuntu22.04
ENV NVIDIA_DRIVER_CAPABILITIES=compute,graphics,vulkan,utility
ENV NVIDIA_VISIBLE_DEVICES=all
ENV DEBIAN_FRONTEND=noninteractive
ENV VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
RUN sed -i 's/ main$/ main contrib non-free/g' /etc/apt/sources.list
RUN apt-get update -y && apt-get install -y \
@cs50victor
cs50victor / Private_Crates.md
Created September 7, 2024 17:59 — forked from kestein/Private_Crates.md
Linking to a private repo in Cargo.toml

Under the dependencies section, put

<crate name>={git="ssh://git@github.com/<organization>/<reponame>.git"}

It is pretty similar to a github repo's ssh cloning link, however the : is replaced with a / and ssh:// is prepended to the URL.

git@github.com:my-organization/my-repo.git vs ssh://git@github.com/my-organization/my-repo.git

The SSH URL needs to be used because Cargo is currently unable to handle the authentication prompt that comes up when an HTTPS link is used.
Make sure that the matches the crate name in the target repo's Cargo.toml. The repo name will not override what is in the Cargo.toml if it is a different value.

@cs50victor
cs50victor / Cargo.toml
Created February 19, 2024 18:28
Download a file with progress feedback using rust
[package]
name = "example"
version = "0.1.0"
edition = "2021"
[dependencies]
reqwest = { version = "0.11.3", features = ["stream"] }
futures-util = "0.3.14"
tokio = { version = "1.13.0", features = ["full"] }
// for running the gaussian splatting viewer without a window ( i.e on a server )
//! ensure the "test_images" directory exists in the root of the project
// c_rr --example headless -- [filename]
use bevy::{
app::ScheduleRunnerPlugin, core::Name, core_pipeline::tonemapping::Tonemapping, prelude::*, render::renderer::RenderDevice,
};
use bevy_panorbit_camera::{PanOrbitCamera, PanOrbitCameraPlugin};
use bevy_gaussian_splatting::{