Skip to content

Instantly share code, notes, and snippets.

View NeoHBz's full-sized avatar

Saurav Lal NeoHBz

View GitHub Profile
#!/usr/bin/env python3
import socket
import sys
import threading
import time
import os
target_host = ''
target_port = 443
@NeoHBz
NeoHBz / requirements.txt
Last active August 12, 2025 08:57
Search query inside Excel and PDFs
pandas
PyPDF2
openpyxl
xlrd
@NeoHBz
NeoHBz / rwmount.sh
Created February 16, 2025 06:22
POSIX Mount as RW
sudo mount -t ext4 -o rw /dev/sdc /mnt/drivealt
@NeoHBz
NeoHBz / logger.ts
Last active February 5, 2025 09:15
type LogLevel = "debug" | "info" | "error";
type Colors = "green" | "red" | "yellow" | "magenta" | "reset";
class Logger {
private static envLevel: LogLevel = "debug";
constructor(logLevel: LogLevel) {
Logger.envLevel = logLevel;
}
@NeoHBz
NeoHBz / docker-compose.yaml
Created January 11, 2025 14:29
Docker Compose for spinning up instance of KASM Workspace
networks:
kasm-network:
driver: bridge
services:
kasm:
image: lscr.io/linuxserver/kasm:latest
container_name: kasm
privileged: true
security_opt:
flowchart TD
    subgraph CA["Certificate Authority"]
        A1["Generate CA Private Key"] --> A2["Generate CA Public Cert (ca.pem)"]
    end

    subgraph Server["Server"]
        B1["Generate Server Private Key (server-key.pem)"] --> B2["Generate Server CSR (server.csr)"]
        B2 -->|"Send CSR"|C1["Sign CSR with CA Key (ca-key.pem)"]
 C1 -->|"Returns Signed Cert"|B3["Receive Server Cert (server-cert.pem)"]
@NeoHBz
NeoHBz / docker-compose.yml
Created August 18, 2024 21:50
Docker - access Postgres on Host
services:
service_name:
image: image_uri
ports:
- "host_port:docker_port"
extra_hosts:
- "host.docker.internal:172.17.0.1" # obtained using $ ifconfig docker0
# network_mode: "host" # this is no longer needed
environment:
DATABASE_URL: postgresql://user:[email protected]:5432/db
# auto, but not tested
echo 'neo ALL=(ALL) NOPASSWD: ALL' | sudo EDITOR='tee -a' visudo
# manual, tested
# sudo visudo
# neo ALL=(ALL) NOPASSWD: ALL
@NeoHBz
NeoHBz / run.sh
Created July 29, 2024 10:21
Run: a zshrc function
run() {
local package_manager="bun"
local script_name="start"
local choice
if [ -f "ecosystem.config.js" ]; then
if [ -f "package.json" ]; then
echo "Both ecosystem.config.js and package.json are present. Which one do you want to run? (e/p, default: p): "
read choice
choice=${choice:-p}
@NeoHBz
NeoHBz / bouncer.json
Created June 26, 2024 08:03
export for Bouncer iOS app to filter SMS
[
{
"type": "any",
"action": "transaction",
"caseSensitive": true,
"subAction": "transactionFinance",
"phrase": "-Federal Bank",
"id": "D3542430-2CBC-4357-A243-90D97D04B908",
"useRegex": false
},