Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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 / 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 / FirefoxDevInstaller.md
Last active January 27, 2024 08:06
Firefox - Dev - Installer - Linux

Install Firefox Dev Installer on Linux

#!/bin/bash
echo "Installing Firefox Dev"
curl --location "https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=en-US"  | tar --extract --verbose --preserve-permissions --bzip2

mkdir -p ~/.local/opt
mv firefox ~/.local/opt
#include "freertos/FreeRTOS.h"
#include "nvs_flash.h"
#include "lwip/err.h"
#include "esp_wifi.h"
#include "esp_wifi_internal.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_event_loop.h"
uint16_t offset = 0;
@prateekrajgautam
prateekrajgautam / ESP32_GetRSSI.c
Created July 17, 2021 18:59 — forked from Staubgeborener/ESP32_GetRSSI.c
Grep and parse the RSSI of received packets
/* ESP32 Get RSSI of packets- Promiscuous Mode
(C) 2017, Staubgeborener
https://github.com/Staubgeborener/ */
#include "esp_wifi.h"
#include "esp_wifi_internal.h"
#include "lwip/err.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_event_loop.h"
@prateekrajgautam
prateekrajgautam / ConvertPDFtoJPG.sh
Last active June 18, 2021 09:46
PDF to JPG batch conversion on linux
#!/bin/bash
sudo apt-get install poppler-utils
mkdir ConvertedJPG
echo "hi"
for f in *
do
echo "converting" $f
pdftoppm -jpeg -rx 300 -ry 300 "$f" JPG
echo "moving converted JPG to " $f "\n"
mkdir "./ConvertedJPG/$f"