Skip to content

Instantly share code, notes, and snippets.

View 13hulk's full-sized avatar

Vikas Z 13hulk

View GitHub Profile
@13hulk
13hulk / .pre-commit-config.yaml
Last active January 29, 2026 11:14
Pybites Rust Cohort: A minimal pre-commit hook
repos:
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt --
language: system
types: [rust]
pass_filenames: false
@13hulk
13hulk / test-tokenizer.rs
Last active January 29, 2026 10:57
Pybites Rust Cohort: Tests for JSON tokenizer - Week 1
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_empty_braces() {
let tokens = tokenize("{}");
assert_eq!(tokens.len(), 2);
assert_eq!(tokens[0], Token::LeftBrace);
assert_eq!(tokens[1], Token::RightBrace);
@13hulk
13hulk / Makefile
Created January 29, 2026 11:13
Pybites Rust Cohort: A minimal Makefile
.PHONY: help build test run fmt clippy check clean pre-commit-install all
help:
@echo "Available commands:"
@echo " make build - Build the project"
@echo " make test - Run tests"
@echo " make run - Run the binary"
@echo " make fmt - Format code"
@echo " make fmt-check - Check formatting"
@echo " make clippy - Run linter"