Skip to content

Instantly share code, notes, and snippets.

View kdkasad's full-sized avatar

Kian Kasad kdkasad

View GitHub Profile
@kdkasad
kdkasad / caps-lock.json
Created June 3, 2025 23:25
Custom Caps Lock rule for Karabiner-Elements
{
"description": "Caps Lock -> Escape when tapped, Command+Control+Option+Shift when held, Caps Lock when tapped with Shift held",
"manipulators": [
{
"description": "Toggle caps lock on shift+caps_lock",
"from": {
"key_code": "caps_lock",
"modifiers": { "mandatory": ["shift"] }
},
"to": [{ "key_code": "caps_lock" }],
@kdkasad
kdkasad / cptemplate.rs
Last active April 9, 2025 21:03
Rust competitive programming template
//!
//! # Rust competitive programming template
//!
//! Copyright (C) 2025 Kian Kasad (@kdkasad).
//! Testing via I/O dependency injection inspired by Eric Park (@ericswpark).
//!
//! You are free to use this template. If you redistribute it or a derivative work, the above
//! copyright notice and credits as well as this permission notice must be kept intact.
//!
//! Requires the following crates as dev-dependencies:
@kdkasad
kdkasad / .clang-format
Last active April 7, 2025 21:13
Clang-Format style definition for CS 240
---
# Written by Kian Kasad <[email protected]>.
# See https://clang.llvm.org/docs/ClangFormatStyleOptions.html.
# Requires clang-format >=20.x.x.
Language: C
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveAssignments: None