Skip to content

Instantly share code, notes, and snippets.

View prateekrajgautam's full-sized avatar
🎯
Focusing

Dr. Prateek Raj Gautam prateekrajgautam

🎯
Focusing
View GitHub Profile
@prateekrajgautam
prateekrajgautam / uninstall nix from wsl.md
Last active July 3, 2024 18:13
Commands to uninstall nix
 sudo mv /etc/zshrc.backup-before-nix /etc/zshrc
 sudo mv /etc/profile.d/nix.sh.backup-before-nix /etc/profile.d/nix.sh
 sudo mv /etc/bashrc.backup-before-nix /etc/barhrc
 sudo mv /etc/bash.bashrc.backup-before-nix /etc/bash.bashrc
 sudo rm -rf /nix

you may want to create default.nix in home dir like /mnt/c/Users/<username/default.nix

@prateekrajgautam
prateekrajgautam / How to use Jupterlab with tensorflow.md
Last active February 26, 2024 11:38
How to use jupyterlab on CAS server instead of googlecolab

First login to server

  • Linux users: Use any linux terminal
  • Windows users: install mobaterm
ssh -X -L 8888:127.0.0.1:8888 username@10.135.27.6
@prateekrajgautam
prateekrajgautam / How to create a docker container and connect to jupyterlab.md
Last active February 6, 2024 05:36
Steps to connect to docker server using tailscale

You need a bash terminal of linu or windown users need to install git bash

after installation rightclick and select git bash here Now you have bash on windows

ssh in to server with

# define server IP
@prateekrajgautam
prateekrajgautam / AI Lab Updates.md
Last active February 24, 2024 08:49
Required AI Lab Update

Graphical or CLI

Identify the current target sudo systemctl get-default The result will likely display either the multi-user.target or graphical.target.

@prateekrajgautam
prateekrajgautam / Guide: Cloudflare Tunnel with Nginx Proxy Manager.md
Last active July 3, 2024 18:17
Guide: Cloudflare Tunnel with Nginx Proxy Manager

Thought I should post my guide on how to do this, as I've struggled with this for quite some time now. I wanted something to bypass the NAT/router as I did not have the option of port-forwarding. I will also be moving quite some in the upcoming year, so dynamic IP was almost a given. And obviously I wanted it to be cheap. This does it all.

This is free, no port-forwarding required and no static IP required. Wildcard domain and SSL certificate supported. It works with Cloudflare tunnels, Cloudflare DNS, Nginx Proxy Manager and obviously TrueNAS SCALE.

I am not a professional, if you see a flaw in this design, please let me know!

Requirements:

  • Domain name at Cloudflare
@prateekrajgautam
prateekrajgautam / cloudflared zero trust tunnel and ssh.md
Last active January 27, 2024 07:50
cloudflared zerotrust tunnel and ssh

cloudflared zero trust tunnel and ssh

SSH conncetion over cloudflared tunnel

create tunnel on cloudflare dashboard zero trust >> access >> tunnels

|subdomain|ssh| |domain|example.com|

@prateekrajgautam
prateekrajgautam / default.md
Last active January 27, 2024 07:56
nix-shell for python eel

default.nix

nix-shell for python eel

with import <nixpkgs> { };

mkShell {
    name = "pybids-dev-env";
    
    buildInputs = with python3Packages; [
        python3
@prateekrajgautam
prateekrajgautam / syntax-patterns.txt
Created October 2, 2023 14:07
Texworks Darkmode color config
# location ~/.TeXworks/configuration/syntax-patterns.txt
# TeXworks: Patterns for syntax coloring
# Each entry consists of three whitespace-separated fields:
# <style> <spell?> <regex>
# <style> is a combination of color and style flags
# Valid syntax:
# <fgcolor>
# <fgcolor>/<bgcolor>
@prateekrajgautam
prateekrajgautam / Nix Configuration.md
Last active June 30, 2024 18:57
NixOS configuration -- Dr. Prateek Raj Gautam

configuration.nix

# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, ... }:

{