Skip to content

Instantly share code, notes, and snippets.

@prateekrajgautam
prateekrajgautam / music-feature-extraction.ipynb
Last active August 26, 2022 06:52
Music Feature Extraction.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@prateekrajgautam
prateekrajgautam / boot live iso from GRUB2.md
Last active January 27, 2024 08:01
Boot live iso from HD using GRUB2 and grml-rescueboot without USB

Boot live iso from HD using GRUB2 and grml-rescueboot without USB

Creates a /boot/grml folder.

sudo mkdir -p /boot/gmrl
sudo nemo /boot/gmrl
# copy bootable iso to grml
sudo apt-get install grml-rescueboot
sudo update-grub
@prateekrajgautam
prateekrajgautam / Samba Install Instructions.md
Last active December 6, 2022 11:14
Samba share on linux

CREATE FOLDER TO SHARE AND ADD PERMISSIONS

cd ~/Documents
mkdir sambaPublicShare
chmod 777 sambaPublicShare

INSTALL SAMBA

sudo apt-get install samba
@prateekrajgautam
prateekrajgautam / Enable Hibernate on Linuxmint.md
Last active January 27, 2024 07:52
Script to enable hibernation on linuxmint

Enable Hibernate on Linuxmint.sh

#!/bin/bash
echo Script to enable hybernation in linuxmint


sudo apt install pm-utils -y && sudo pm-hibernate
@prateekrajgautam
prateekrajgautam / tftp_dhcp_samba_server.sh
Created September 1, 2023 10:46
Network Boot with dhcp tftp and samba
#!/bin/bash
echo "install tftp and dhcp server"
sudo apt install isc-dhcp-server tftpd-hpa samba cifs-utils samba-client -y
sudo systemctl start isc-dhcp-server
sudo systemctl enable isc-dhcp-server
sudo systemctl start tftpd-hpa
@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, ... }:

{
@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 / 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 / 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 / Guide: Cloudflare Tunnel with Nginx Proxy Manager.md
Last active May 9, 2025 17:25
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