Skip to content

Instantly share code, notes, and snippets.

View phanirithvij's full-sized avatar
💫
you spin me right round ...

loudgolem phanirithvij

💫
you spin me right round ...
View GitHub Profile
@phanirithvij
phanirithvij / nix-lang.md
Last active October 23, 2025 06:51 — forked from edolstra/nix-lang.md
Nix language changes

This document contains some ideas for additions to the Nix language.

Motivation

The Nix package manager, Nixpkgs and NixOS currently have several problems:

  • Poor discoverability of package options. Package functions have function arguments like enableFoo, but there is no way for the Nix UI to discover them, let alone to provide programmatic ways to
@phanirithvij
phanirithvij / main.go
Created May 9, 2025 11:45
seedr.cc webseed proxy
package main
import (
"fmt"
"io"
"log"
"net/http"
"net/url"
)
@phanirithvij
phanirithvij / B2_snapshot_restore.clean.ipynb
Created February 10, 2025 09:50 — forked from Jwink3101/B2_snapshot_restore.clean.ipynb
Demonstration of extracting from a Backblaze Restor
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phanirithvij
phanirithvij / README.md
Last active January 29, 2025 16:06
debug_colab, basic tmux server for google colab, alternative to embedded colab-xterm
  • It relies on free plan of cloudflare tunnels. You can ofcourse adapt it to use ngrok, frp etc.
  • It depends on nix, because nix is simply the best option to install software on linux.
  • Not any better than xterm, and because it opens in a new tab, might even kill the colab

So overall use at your own risk.

@phanirithvij
phanirithvij / readme.md
Created January 24, 2025 15:49
test image

image

@phanirithvij
phanirithvij / default.nix
Created January 18, 2025 06:52 — forked from nmattia/default.nix
Report for runtime dependencies of a derivation
# MIT License, see below
#
# These are some helpers for figuring out the derivations attributes of runtime
# dependencies of a derivation, in particular the function `runtimeReport`. At
# the bottom of the file you can see it used on `hello`. Spoiler: glibc is a
# runtime dependency.
# For more info see
#
# https://nmattia.com/posts/2019-10-08-runtime-dependencies.html
@phanirithvij
phanirithvij / minimod.nix
Created December 17, 2024 13:31 — forked from roberth/minimod.nix
Simple and quick module system alternative + thoughts and tasks
/*
minimod: A stripped down module system
TODO Comparison:
- [ ] Come up with a benchmark "logic" using plain old functions and let bindings
- [ ] Write the benchmark for the module system
- [ ] Write the benchmark for POP?
- [ ] Qualitative comparison of extensibility in the context of composable
Nixpkgs packaging logic
TODO Fine-tuning:
@phanirithvij
phanirithvij / ufetch-0.4.patch
Created November 23, 2024 19:43
patch for ufetch 0.3->0.4
diff --git a/pkgs/by-name/uf/ufetch/0001-optimize-packages-command.patch b/pkgs/by-name/uf/ufetch/0001-optimize-packages-command.patch
deleted file mode 100644
index e303db4968a8..000000000000
--- a/pkgs/by-name/uf/ufetch/0001-optimize-packages-command.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/ufetch-nixos b/ufetch-nixos
-index 2ca8f9d..5102cd7 100755
---- a/ufetch-nixos
-+++ b/ufetch-nixos
@phanirithvij
phanirithvij / init.lua
Created January 24, 2024 11:29
go, lsp, minimal nvim
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
local uv = vim.uv or vim.loop
-- Auto-install lazy.nvim if not present
if not uv.fs_stat(lazypath) then
print('Installing lazy.nvim....')
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
@phanirithvij
phanirithvij / get-fixed-volume-mounts.go
Created August 11, 2023 14:22 — forked from kostix/get-fixed-volume-mounts.go
Getting the list of fixed volumes and their mounts
package main
import (
"errors"
"log"
"strings"
"syscall"
"unsafe"
)