Skip to content

Instantly share code, notes, and snippets.

View samarthdave's full-sized avatar

Samarth Dave samarthdave

View GitHub Profile
@samarthdave
samarthdave / address_of_and_dereference.c
Created April 3, 2024 01:51
dereference and address of operators shown simply
#include <stdio.h>
void change(int* value) {
*value += 5; // dereference operator
}
int main() {
int a = 5;
printf("a = %d \n", a);
@samarthdave
samarthdave / script.js
Created April 26, 2021 23:33
Canvas Grades Script
// in general, don't just copy and paste scripts from the internet
// but this one is pretty useful if I do say so myself; you can trust it ;)
// USAGE:
// Canvas > CSCE 430 > Grades > Open Inspector/DevTools > Paste into Console
var TABLE_SELECTOR = '.student_assignment.assignment_graded.editable';
var NUM_PSETS = 14;
var NUM_LABS_ = 14;
@samarthdave
samarthdave / quizlet.js
Last active April 19, 2021 03:44
Get total quizlet card count on a user's profile
// requires jQuery
var items = $(".SetPreview-cardBylineWrapper");
function parseStr(strr) {
var num = strr.split(" ")[0];
return parseInt(num);
}
var total = 0;
for (var i = 0; i < items.length; i++) {
@samarthdave
samarthdave / box.gif
Last active December 17, 2020 16:57
📦 Quarantine Care Package 📦
box.gif