Skip to content

Instantly share code, notes, and snippets.

View sunipkm's full-sized avatar
💭
Just a mirror for the Sun :)

Sunip Mukherjee sunipkm

💭
Just a mirror for the Sun :)
View GitHub Profile
@sunipkm
sunipkm / setup-nut-and-netdata-on-ubuntu.md
Created March 5, 2026 20:58 — forked from Jiab77/setup-nut-and-netdata-on-ubuntu.md
In this document, I will explain how to setup nut (Network UPS Tools) on Ubuntu 18.04 and 20.04.

Setup nut and netdata on Ubuntu

In this document, I will explain how to setup nut (Network UPS Tools) on Ubuntu 18.04 and 20.04.

It is basically the next chapter of my previous gist, Upgrade nut on Ubuntu 18.04.

I'll only document USB connected UPS and not the other supported connection modes.

Install required dependencies

@sunipkm
sunipkm / microgpt.py
Created February 23, 2026 20:30 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@sunipkm
sunipkm / debian12_configuration_script.sh
Last active October 27, 2025 20:57 — forked from cyberpunk042/debian12_configuration_script.sh
TrueNAS Scale 24.04.2 Customization
#!/bin/bash
# Set script to exit on error
set -e
# Enable logging
exec > >(tee -i /var/log/setup-script.log)
exec 2>&1
echo "Starting script execution..."
@sunipkm
sunipkm / hpe_sos_ubuntu.md
Created October 27, 2025 20:55 — forked from yukirii/hpe_sos_ubuntu.md
installing HPE StoreOpen Software for RHELx64 to Ubuntu 20.04.2 LTS (Reference: https://rabbit-note.com/2020/01/12/ubuntu-ltfs/)
@sunipkm
sunipkm / eduroam.sh
Last active June 6, 2025 17:14 — forked from AntonFriberg/eduroam.sh
Connect to eduroam on Lund University with NetworkManager
nmcli con add \
type wifi \
con-name "eduroam"
ifname "wlp4s0" \ # Your wifi interface
ssid "eduroam" \
wifi-sec.key-mgmt "wpa-eap" \
802-1x.identity "<YOUR-STUDENT-ID>@lu.se" \ # May also use another university identification
802-1x.password "<YOUR-PASSWORD" \
802-1x.system-ca-certs "yes" \
802-1x.domain-suffix-match "radius.lu.se" \
@sunipkm
sunipkm / rust_mem_profiling.md
Created February 17, 2025 03:46 — forked from HenningTimm/rust_mem_profiling.md
Memory profiling Rust code with heaptrack in 2019
#!/bin/bash
# This Works is placed under the terms of the Copyright Less License,
# see file COPYRIGHT.CLL. USE AT OWN RISK, ABSOLUTELY NO WARRANTY.
#
# COPYRIGHT.CLL can be found at http://permalink.de/tino/cll
# (CLL is CC0 as long as not covered by any Copyright)
OOPS() { echo "OOPS: $*" >&2; exit 23; }
[ -z "`pidof openssl`" ] || OOPS "openssl running, consider: killall openssl"
@sunipkm
sunipkm / ANSI.md
Created October 19, 2021 03:19 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1b
  • Decimal: 27