Skip to content

Instantly share code, notes, and snippets.

View vinitkumar's full-sized avatar
🎯
Focusing

Vinit Kumar vinitkumar

🎯
Focusing
View GitHub Profile
#!/usr/bin/env bash
# Collect Remote Cast screen-share diagnostics from a Linux desktop.
#
# Run as the logged-in desktop user (NOT root, NOT via sudo):
# bash diag-remote-cast.sh
# Sends everything to remote-cast-diag-<host>-<time>.txt in the current
# directory. Attach that file to the ticket.
set +e
AGENT=/opt/tux-agent/libexec/remote-agent
@vinitkumar
vinitkumar / README.md
Last active September 21, 2026 19:38
Monk: a quiet, Vim-driven, AI-free VS Code profile

Monk VS Code profiles

Deliberately plain VS Code profiles with an 18 px editor font, Vim motions, and almost everything else switched off. Monk uses Quiet Light; Monk Dark uses Dark Modern.

Install

Read the script first, then run it:

curl -fsSL https://gist.githubusercontent.com/vinitkumar/0a6940afafc25b1f905516dfb4b41dbd/raw/install.sh | less
#!/usr/bin/env bash
set -euo pipefail
OUT="active-user-debug-$(hostname)-$(date +%Y%m%d-%H%M%S).log"
exec > >(tee "$OUT") 2>&1
echo "=== Host Info ==="
date -Is
hostnamectl || true
@vinitkumar
vinitkumar / pre-commit
Created August 13, 2025 08:08
Git pre commit hook for python projects using ruff, place it in .git/hooks/pre-commit, chmod +x .git/hooks/pre-commit
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
package main
import (
"bufio"
"fmt"
"io"
"log"
"os"
"os/exec"
"runtime"
package main
import (
"bufio"
"bytes"
"io"
"log"
)
func main() {

Security Checklist

Configuration Security

  • Store secrets in environment variables or dedicated secret management systems
  • Never commit secrets to version control
  • Implement secret rotation policies
  • Use different credentials for different environments
  • Encrypt sensitive configuration values

Authentication & Authorization

#! /opt/homebrew/bin/python3
import sys
import datetime
template = """# Journal Entry - [Date]
== Overview ==
[Provide a brief overview of the day or the main events.]
def convert_none(
key: str, val: None, attr_type: bool, attr: Dict[str, Any] = {}, cdata: bool = False
) -> str:
"""Converts a null value into an XML element"""
LOG.info(f'Inside convert_none(): key="{str(key)}" val={type(val)}')
key, attr = make_valid_xml_name(key, attr)
if attr_type:
attr["type"] = get_xml_type(val)
attrstring = make_attrstring(attr)
ber/libdecnumber.a
[gcc/build] clang: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument]
[gcc/build] clang: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument]
[gcc/build] Undefined symbols for architecture arm64:
[gcc/build] "_ZSTD_compress", referenced from:
[gcc/build] Undefined symbols for architecture arm64:
[gcc/build] "_ZSTD_compress", referenced from:
[gcc/build] lto_end_compression(lto_compression_stream*) in libbackend.a(lto-compress.o)
[gcc/build] lto_end_compression(lto_compression_stream*) in libbackend.a(lto-compress.o)
[gcc/build] "_ZSTD_compressBound", referenced from: