Skip to content

Instantly share code, notes, and snippets.

@nazq
nazq / disable_ipv6.ps1
Created November 19, 2023 01:09
Powershell Script to disable IPV6
# Check if the script is running with administrator privileges
$principal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
if (-not $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
# Relaunch the script with elevated permissions
Start-Process -FilePath "powershell" -ArgumentList "-File $($MyInvocation.MyCommand.Path)" -Verb RunAs
exit
}
# Get network adapters and their IPv6 status
$adapters = Get-NetAdapterBinding | Select-Object Name, DisplayName, ComponentID, Enabled
@nazq
nazq / git-worktree.sh
Created June 13, 2025 11:47
git worktree helper
######################################
# git_wt_init - Set up Git worktree repo
######################################
git_wt_init() {
local GIT_URL="$1"
local MAIN_BRANCH="${2:-main}"
if [[ "$1" == "--help" || -z "$GIT_URL" ]]; then
echo ""
@nazq
nazq / claude-session.sh
Last active November 26, 2025 15:34
Claude Session Manager - tmux session manager for Claude Code
#!/bin/bash
# Claude Session Manager for Git Worktrees
# Usage: claude_session [session_name] [--attach]
# Alias: cs
claude_session() {
local session_name=""
local auto_attach=false
local custom_name=""
@nazq
nazq / describe.rs
Created September 29, 2025 18:57
Polars DataFrame describe() implementation for Rust - provides summary statistics like pandas/polars Python
//! DataFrame describe() functionality for Polars in Rust
//!
//! This module provides a `describe()` method for both DataFrame and LazyFrame,
//! similar to pandas/polars describe() in Python. It computes summary statistics
//! including count, null_count, mean, std, min, percentiles, and max.
//!
//! The implementation follows the Python polars pattern closely, avoiding
//! unnecessary data collection when working with LazyFrames.
use anyhow::Result;