Skip to content

Instantly share code, notes, and snippets.

View arya2004's full-sized avatar
🪡
exploring pharloom

Arya Pathak arya2004

🪡
exploring pharloom
View GitHub Profile
@arya2004
arya2004 / arya2004_g14_personal
Last active December 31, 2025 20:47
My VS Code config.
{"name":"arya2004_g14_personal","settings":"{\"settings\":\"{\\r\\n \\\"workbench.iconTheme\\\": \\\"material-icon-theme\\\",\\r\\n \\\"workbench.startupEditor\\\": \\\"none\\\",\\r\\n \\\"git.suggestSmartCommit\\\": false,\\r\\n \\\"editor.fontFamily\\\": \\\"'Cascadia Mono',Cascadia Mono,Consolas, 'Courier New', monospace\\\",\\r\\n \\\"editor.fontSize\\\": 16,\\r\\n \\\"terminal.integrated.enableMultiLinePasteWarning\\\": false,\\r\\n \\\"solidity.telemetry\\\": false,\\r\\n \\\"github.copilot.enable\\\": {\\r\\n \\\"COBOL\\\": true,\\r\\n \\\"COBOLIT\\\": true,\\r\\n \\\"ACUCOBOL\\\": true,\\r\\n \\\"BITLANG-COBOL\\\": true,\\r\\n \\\"RMCOBOL\\\": true,\\r\\n \\\"ILECOBOL\\\": true,\\r\\n \\\"COBOL_MF_LISTFILE\\\": false,\\r\\n \\\"COBOL_PCOB_LISTFILE\\\": false,\\r\\n \\\"COBOL_ACU_LISTFILE\\\": false,\\r\\n \\\"COBOL_MF_PREP\\\": false,\\r\\n \\\"mfu\\\": false,\\r\\n \\\"utreport\\\": false,\\r\\
@arya2004
arya2004 / aws-nuke.sh
Last active September 22, 2025 11:46
This Bash script force-deletes all AWS resources across all regions in safe order. It sweeps compute (EC2, Lambda, RDS, DynamoDB, EKS, ECS, ELB/ALB, Auto Scaling, etc.), storage (S3, ECR), messaging (SQS, SNS), CloudFormation stacks, and networking (NAT gateways, EIPs, ENIs, IGWs, route tables, subnets, non-default NACLs/SGs/DHCP options, VPCs).
#!/bin/bash
set -euo pipefail
# ===== CONFIG =====
CONFIRM=${CONFIRM:-yes}
PARALLEL_REGION_JOBS=${PARALLEL_REGION_JOBS:-1}
RDS_SKIP_FINAL_SNAPSHOT=${RDS_SKIP_FINAL_SNAPSHOT:-true}
# ===== HELPER FUNCS =====
confirm() {
@arya2004
arya2004 / advance.go
Created March 2, 2025 15:04
Forward Mode Automatic Differentiation in Go
package main
import (
"fmt"
"math"
)
// Dual represents a dual number: a + bε.
type Dual struct {
Real float64
@arya2004
arya2004 / README.md
Created January 24, 2025 17:52
This Gist provides examples of how to create and schedule cron jobs for monitoring purposes. It includes a Bash script and a Go application that both check the availability of `google.com` every 5 minutes.

Cron Job Examples: Bash and Golang

This repository contains two examples of how to monitor google.com every 5 minutes using a Bash script and a Go application.


1. Bash Script Execution Instructions

Create and Set Up the Script

@arya2004
arya2004 / README.md
Created July 27, 2024 12:52
How to Contribute to GitHub Repository

Step 1: Fork the Repository

  1. Navigate to the Repository: Go to the GitHub page of the repository you want to contribute to.

Screenshot from 2024-07-27 18-02-57

  1. Fork the Repository: Click the Fork button in the upper right corner of the repository page. This will create a copy of the repository in your own GitHub account.

Screenshot from 2024-07-27 18-03-08

@arya2004
arya2004 / 000_README.md
Last active July 26, 2024 18:28
Deep Dive into Closures in Go: Theoretical Foundations and Practical Applications
@arya2004
arya2004 / defer-caveat-1.go
Last active July 26, 2024 16:26
Understanding Functions, Recursion, and Defer in Go
package main
import (
"fmt"
"os"
)
func main() {
for i := 0; i < 3; i++ {
file, err := os.Open("example.txt")
@arya2004
arya2004 / README.md
Last active July 26, 2024 15:11
Guide to Configuring Signed Git Commits with GPG

Guide to Configuring Signed Git Commits with GPG

You only need to follow these steps if you want to use GPG keys for signing.

Setup (for GPG)

First, you need to get GPG. This tutorial uses GnuPG, but there may be other implementations.

@arya2004
arya2004 / README.md
Created July 14, 2024 06:48
A guide and script to temporarily disable and enable the laptop keyboard while using an external keyboard in Linux Mint.

Step-by-Step Guide

  1. Identify Your Laptop Keyboard Device ID: Open a terminal and run:
    xinput list
    This command will display a list of all input devices connected to your system. Look for an entry that corresponds to your laptop keyboard, such as "AT Translated Set 2 keyboard" or something similar. Note down the device ID (e.g., 11).