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

The Problem

usb0 interface is DOWN.

Solution Part 1

Create a new connection: In /etc/network/interfaces.d/usb0.conf, write

allow-hotplug usb0
iface usb0 inet static
 address 192.168.7.2
@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
@sunipkm
sunipkm / ffmpeg_tidbits.md
Created October 18, 2024 03:42
FFmpeg Tidbits

Change frame rate (25 FPS to 23.976 FPS)

$ ffmpeg -y -i INPUT -vf "setpts=25025*PTS/24000" -r 23.976 -af atempo=24000/25025 OUTPUT
@sunipkm
sunipkm / git_tidbits.md
Created September 11, 2024 19:35
Git Tidbits

Git Tidbits

Removing files in post after changing .gitignore

$ git rm --cached `git ls-files -i -c --exclude-from=.gitignore`