Skip to content

Instantly share code, notes, and snippets.

View ninadpchaudhari's full-sized avatar
:shipit:

Ninad P.Chaudhari ninadpchaudhari

:shipit:
View GitHub Profile
@ninadpchaudhari
ninadpchaudhari / questions.md
Last active August 8, 2026 00:54
Ice breaker tutor questions

Meet Your Course Tutor

  1. What’s your name, and what do you study?
  2. Why should they come and see you! ( a accountability partner or to build connections )
  • Meeting in addition to instructor's office hours and despite the new AI tools
  • Folks who have done this course can use the same tools you would have used more effectively
  • Show your best assignment / project work!

  1. What was your first experience with computers or coding?
@ninadpchaudhari
ninadpchaudhari / readme.md
Created June 19, 2026 17:07
Whatsapp chat export - formatting to csv

Moving all of them in the same line

  1. In the find tab: click the .* button.
  2. In Find, paste:
\r?\n(?![\u200E\u200F]?\[\d{1,2}\/\d{1,2}\/\d{2,4},)
  1. Replace with a single space.
  2. Replace the weird [U+200E] with space tooo

Getting the CSV After

Gemini summary!

1. The Trigger: A "Greedy" Regular Expression

Cloudflare uses a Web Application Firewall (WAF) to inspect incoming traffic for attacks. An engineer deployed a rule to block cross-site scripting (XSS). The rule used a Regular Expression (Regex) to find patterns in the data.

  • The Technical Flaw: The Regex contained a pattern that triggered Exponential Backtracking.
  • The "Greedy" Loop: When a Regex engine encounters a complex pattern with many wildcards (like .*.*), it tries every possible way to match the text. If the text almost matches but not quite, the computer gets stuck in a loop of trillions of calculations just to check a single line of code.

2. The Failure: 100% CPU Exhaustion

@ninadpchaudhari
ninadpchaudhari / Vimium_c_speedgrader_mappings
Last active March 19, 2026 14:55
Vimium C Shortcuts for Canvas SpeedGrader - Custom key mappings to make life easier when grading.
" Right Arrow -> Next student.
" Left Arrow -> Previous student.
" Meta (Ctrl or CMD) +S -> Update Score
" You need a chrome plugin named - Vimium C
" Define the Canvas SpeedGrader environment
env speedgrader host="^https://canvas\.siena\.edu/courses/\d+/gradebook/speed_grader"
" 1. The actual click actions (hidden keys)
map <f10> LinkHints.click match="#next-student-button" env="speedgrader"

Way too "tricky"...

  • numberSquare
  • fixError3
  • partyOfThree
  • veryBestSong
  • rocketShips | This one is bad lol

Hints

  • inchesToCentimers - use throw in
@ninadpchaudhari
ninadpchaudhari / lab0.md
Last active January 21, 2026 14:44
LAb 0 - Sp26

Lab: How the Web Works.

An Introduction to HTTP

Course: Intro to Web / Software Engineering Topic: HTTP, Requests, Responses, and Browsers
Estimated Time: 45–60 minutes
Resources:

filebrowser:
image: filebrowser/filebrowser:latest
container_name: filebrowser
restart: unless-stopped
ports:
- "8081:80" # Web UI on http://server:8081
volumes:
- kf6_mongo_data:/srv

Individual - Profiles App with GitHub Actions

This assignment gets you from a clean dev container to a deployed GitHub Pages site using GitHub Actions, and introduces components, props, states and .map().

Reminder, Nov 7th lecture is extended workshop ( join in for atleast an hour via zoom with Kuri to work on this lab)

Due Date : Before next lab

  • Parts 0,1,2 => Should take you about an hour,
  • Parts 3,4,5 => Due before next lab.
@ninadpchaudhari
ninadpchaudhari / pc2load.md
Created April 27, 2025 18:33
PC2 Load Testing

PC2 Loading

Topics

  1. Types of Load Testing
  2. Reverse Proxy
  3. Replay Attacks
  4. CSRF Tokens

Assumptions

  1. Worst case: All students submit their work in the last minute of the competition

Jest Assignment: JavaScript Queue

Project Description

This repository contains a JavaScript implementation of a Queue data structure inspired by Princeton's Intro to Programming. You are the developer and must write robust unit tests using Jest.

Bug: The dequeue() method does not throw an error when called on an empty queue. This violates expected behavior and must be caught through testing.