Skip to content

Instantly share code, notes, and snippets.

View Vaisakhkm2625's full-sized avatar

Vaisakh K M Vaisakhkm2625

  • <-- you don't need to know :)
View GitHub Profile
@Vaisakhkm2625
Vaisakhkm2625 / create_virtual_tailscale_netoworks.py
Created February 3, 2026 20:08
run mulitiple tailscale instances in same system, by creating virutal networks namespaces in linux
#!/usr/bin/env python3
"""
Creates an isolated network namespace with:
- veth pair + NAT for real internet access
- simple HTTP server
- tailscaled in userspace-networking mode
- joins Tailscale using ephemeral tagged auth key
Requires: root privileges, tailscale installed, requests library, iptables
"""
@Vaisakhkm2625
Vaisakhkm2625 / set-java.bat
Created November 26, 2025 09:37
swtich java version
@echo off
set "JAVA8=C:\Program Files\Eclipse Adoptium\jdk-8.0.472.8-hotspot"
set "JAVA21=C:\Program Files\Eclipse Adoptium\jdk-21.0.9.10-hotspot"
set "JAVA17=C:\Program Files\Eclipse Adoptium\jdk-17.0.17.10-hotspot"
if "%~1" == "21" (
set "JAVA_HOME=%JAVA21%"
setx JAVA_HOME "%JAVA21%"
) else if "%~1" == "17" (
set "JAVA_HOME=%JAVA17%"
@Vaisakhkm2625
Vaisakhkm2625 / a.nix
Last active November 5, 2024 14:26
non free allow nix
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; config.allowUnfree = true; };
});
in
@Vaisakhkm2625
Vaisakhkm2625 / cloneallrepo.sh
Created September 1, 2024 17:13
clone all repo from github
eval "$(ssh-agent -s)" # Start the ssh-agent
ssh-add ~/.ssh/id_rsa # Add your SSH key:
gh repo list --json=sshUrl --limit 1000 -q ".[].sshUrl" | xargs -n1 git clone
linode
setup fedora vm
```
useradd vaisakh
passwd vaisakh
usermod -a-G wheel vaisakh
su vaisakh
sudo dnf update
@Vaisakhkm2625
Vaisakhkm2625 / starpatternsin.py
Created July 6, 2024 21:53
star-pattern-sinwave
for i in range(1,10000):
print(round(35+35*math.sin(i/5))*" ","*")
# https://jeancharles.quillet.org/posts/2022-01-30-Local-mariadb-server-with-nix-shell.html
let pkgs = import <nixpkgs> {};
in pkgs.mkShell {
buildInputs = [ pkgs.mariadb ];
shellHook = ''
MYSQL_BASEDIR=${pkgs.mariadb}
MYSQL_HOME=$PWD/mysql
MYSQL_DATADIR=$MYSQL_HOME/data
export MYSQL_UNIX_PORT=$MYSQL_HOME/mysql.sock
MYSQL_PID_FILE=$MYSQL_HOME/mysql.pid