Skip to content

Instantly share code, notes, and snippets.

View bkataru's full-sized avatar
⚒️
honing thy craft

Baalateja Kataru bkataru

⚒️
honing thy craft
View GitHub Profile
@bkataru
bkataru / Microsoft.PowerShell_profile.ps1
Created September 25, 2025 05:31
Microsoft.PowerShell_profile.ps1 on da threadripper
Import-Module Terminal-Icons
Import-Module posh-git
function prompt {
function Get-CPUUsage {
$cpu = Get-CimInstance -ClassName Win32_Processor | Select-Object -ExpandProperty LoadPercentage
return $cpu
}
function Get-MemoryUsage {
$mem = Get-CimInstance -ClassName Win32_OperatingSystem
@bkataru
bkataru / zed-settings.jsonc
Last active September 22, 2025 12:19
zed settings
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"language_models": {
const std = @import("std");
// DTO for deserialization
const LLMResponse = struct {
id: []const u8, // Unique identifier for the response
object: []const u8, // Type of object returned
created: u32, // Unix timestamp of when the response was generated
model: []const u8, // Name of the model used to generate the response
usage: ?struct { // Usage statistics for the response, optional
prompt_tokens: u32, // Number of tokens in the prompt
@bkataru
bkataru / oneTabExporter.js
Last active March 20, 2025 20:56
smol JS script to export OneTab links with additional useful metadata (tab count, creation timestamp, tab names), to use: go to OneTab page -> open DevTools (F12) -> open Console -> type "allow pasting" to disable XSS protection -> paste this script and press enter
let tabGroups = document.getElementsByClassName('tabGroup');
const headerTemplatizer = (tabCount, timestamp) => `
---
## ${tabCount}
> ${timestamp}
`;
const tabTemplatizer = (textContent, href) => `[${textContent}](${href})`;
@bkataru
bkataru / tron-legacy.omp.json
Last active March 17, 2025 20:15
a Tron Legacy inspired color scheme for Windows Terminal and Oh My Posh
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#00ff00",
"style": "plain",
Informational R. Pantos, Ed.
Internet-Draft Apple Inc.
Obsoletes: 8216 (if approved) 17 February 2025
Intended status: Informational
Expires: 21 August 2025
@bkataru
bkataru / contxtgen.ps1
Last active March 18, 2025 14:57
bash & powershell scripts to compile the contents of the files in the current directory as context for an LLM
<#
.SYNOPSIS
Generate a context file by compiling the contents of files in a directory.
.DESCRIPTION
This script scans a specified directory, compiles file contents into a single output file, and excludes specified directories, files, and optionally hidden paths (with dot-prefixed names). It respects a maximum file size limit and provides detailed logging.
.PARAMETER OutputFile
Specifies the output file name. Default is "context.txt".
@bkataru
bkataru / Scaffold.ps1
Created December 22, 2024 09:48
scaffolding for bkataru-recreations
Write-Host "Creating .vscode"
New-Item -Path .\.vscode -ItemType Directory | Out-Null
Write-Host "Creating .vscode\settings.json"
New-Item -Path .\.vscode\settings.json -ItemType File | Out-Null
Write-Host "Creating .gitignore"
New-Item -Path .\.gitignore -ItemType File | Out-Null
Write-Host "Creating README.md"
@bkataru
bkataru / buffered.go
Last active February 9, 2024 10:02
OwO d-demonstrating c-channel chans in go ( ͡° ͜ʖ ͡°)
package main
import (
"fmt"
"time"
)
func main () {
var c = make(chan int, 5)
go process(c)