Skip to content

Instantly share code, notes, and snippets.

View ninadpchaudhari's full-sized avatar
:shipit:

Ninad P.Chaudhari ninadpchaudhari

:shipit:
View GitHub Profile
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.


@ninadpchaudhari
ninadpchaudhari / readme.md
Created April 21, 2025 04:11
Gist on the Tuya Integration for Category "dr" (Heated Blanket) Integration

The Heated Blanket Integration

The documentation about this device on Tuya's developer docs is old, but their device control API can be used to see all about the category.

Exploring the specific case of Sunbeam heated mattress

  • The device follows the instruction set of "dr"
  • It has a product id of : ebb820c3cd7beefe10lhkg
  • It supports a superset of Standard Instruction set, which are not crucial and can be implemented by someone later if required.
@ninadpchaudhari
ninadpchaudhari / back.Dockerfile
Created April 9, 2025 21:43
Idealy you should use npm build to generate static files from your frontend and have them deployed, but for now, feel free to use this Dockerfile as a reference
FROM node:22 as build
WORKDIR /app
COPY package.json /app/package.json
COPY package-lock.json /app/package-lock.json
RUN npm install
COPY . /app
package edu.siena;
import java.util.List;
public class CartProcessor {
public static double calculateTotal(List<Double> prices) {
double total = 0.0;
for (int i = 0; i <= prices.size(); i++) {
total += prices.get(i);
}

Nodejs and Serverside

Install Nodejs and NPM

  • Already installed on Github Codespaces

  • On your local machine, you can install Nodejs and NPM using the package manager of your choice.

  • Example on MacOS, you can use Homebrew: brew install node

  • On Windows, you can download the installer from the Nodejs website.

  • On Windows, you can also use the Windows Subsystem for Linux (WSL) to install Nodejs and NPM using the Linux instructions above.

public class ConditionalLoopExample {
public static void main(String[] args) {
int x = 0;
while (x < 5) {
if (x % 2 == 0) {
System.out.println(x + " is even");
} else {
System.out.println(x + " is odd");
}
x++;
@ninadpchaudhari
ninadpchaudhari / nginx_conf.partial
Created March 14, 2025 04:21
Only required headers for KF
# WebSocket proxying
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
server_name examplecat.com;
location / {
# Backend nodejs server
#for uploading