Skip to content

Instantly share code, notes, and snippets.

View AbhinavMadahar's full-sized avatar

Abhinav Madahar AbhinavMadahar

View GitHub Profile
@AbhinavMadahar
AbhinavMadahar / gpa.md
Last active September 14, 2015 19:08
GPA Ranking in MHS

GPA Ranking: a Simple Proof

Millburn High School does not officially give out class ranks, so you can't truly know if you're in the top 10% or whatever of your grade. That said, it's not too difficult to find this out based on some simple mathematics, although the answer may not be very accurate.

Before I show the proof itself, I want to tell you something: do NOT get caught up in this proof. I am a high schooler just like you, and I have no real mathematical background- I just really like making proofs as a fun pastime. Your worth as a student and human being is not calculatable as a single number. Colleges care about more than just your class rank, so don't get too depressed if you have a subpar class rank. It's just not fun to worry, and worrying about a problem is one of the best ways to avoid having it fixed- I would know. You are NOT your class rank. As Matthew McConaughey said in Interstellar,

It takes two numbers to measure your own ass, bu

@AbhinavMadahar
AbhinavMadahar / line.c
Last active August 29, 2015 14:27
Follows a line
#pragma config(Sensor, in1, baseLightSensor, sensorLineFollower)
#pragma config(Sensor, dgtl1, senseDistance, sensorSONAR_cm)
#pragma config(Motor, port6, backLeftMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port7, frontLeftMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port8, frontRightMotor, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port9, backRightMotor, tmotorVex393_MC29, openLoop, reversed)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
#define not !
@AbhinavMadahar
AbhinavMadahar / Web-Sockets.md
Last active August 29, 2015 14:18
A Very Simple Tutorial on Socket.io

Chatte

This is a simple chat server that adds a new message to all other users' view without needed a page refresh, and all automatically.

It uses the following frameworks:

  • node.js allows us to run JavaScript on the backend
  • express.js makes routing and other basic backend tasks easy
  • socket.io uses Web sockets to share data between the client and server