Skip to content

Instantly share code, notes, and snippets.

View adi-g15's full-sized avatar
🙏
Better day by day

Aditya Gupta adi-g15

🙏
Better day by day
View GitHub Profile
@adi-g15
adi-g15 / arduino-cli-nodemcu.md
Created November 30, 2022 11:09
Using arduino / arduino-cli with NodeMCU (esp8266)

After a lot of searching over the network, this is what I have ended up with. This is intentionally made such that even a absolute beginner is able to follow, so uses fixed paths.

Note: I am not using the --additional-urls flag since it didn't work for me back then, you may try it.

Step 0

First ensure that your PC is detecting the NodeMCU atleast.

arduino-cli board list
@adi-g15
adi-g15 / main.md
Last active August 3, 2021 10:13
Sawtooth application, simulating steps
@adi-g15
adi-g15 / week_breakdown.md
Created May 29, 2021 19:18
Weekly Breakdown

Weekly Breakdown

@adi-g15
adi-g15 / pypi-search.md
Created May 20, 2021 07:33
pip search alternative
#!/bin/bash
# pypi-search.sh 
# This script fetch data from https://pypi.org/simple/ 
# process the output for simple package name output with perl
# and then apply a regex pattern to the result

pypiurl=https://pypi.org/simple/
@adi-g15
adi-g15 / signing_executable.md
Created May 6, 2021 17:57
Signing executable/scripts on Windows
@adi-g15
adi-g15 / Understanding_CSRF.md
Last active November 9, 2020 08:57
Understanding CSRF

Understanding CSRF

Source- https://github.com/pillarjs/understanding-csrf

Reason- To keep as a self note, but also public, there's no problem if someone else spends a minute or two to read this article/readme.

The Express team's csrf and csurf modules frequently have issues popping up concerned about our usage of cryptographic functions. These concerns are unwarranted due to a misunderstanding of how CSRF tokens work. So here's a quick run down!

@adi-g15
adi-g15 / graphMat.md
Created October 23, 2020 10:09
Implementing a Matrix data structure using Graphs

Implementing a Matrix data structure using Graphs

Generally, we would use a std::vector<std::vector> data structure, to hold a matrix, say a 3x3 matrix. Though, here what we will be creating is a custom Matrix class, using nodes and `pointers`.

Possible Use Case ->

  1. You need a matrix, that may expand and compress many times

    In this case, using vector<vector> will cause memory allocations that may require whole copy of the matrix to a new location, this can be big overhead when working with large matrices

  2. Equal/Controlled expansion on particular/all sides of the matrix,

    This will likely be not what you need to do, generally, but here we are taking a look for interest. In this also, vector<vector> may need frequent copies of whole matrix to new array (almost always actually in this case)

@adi-g15
adi-g15 / Repos.md
Created September 24, 2020 08:44
HacktoberFest2020

HacktoberFest2020

A repo listing the repos under this account, where beginners can contribute

  1. Ludo-The_Game - C++, HTML, ReactJS

    Follow the issues section for the issues, you will find many beginner issues there

  2. AttendancePortal - HTML, CSS, JS

    This is a good start for a beginner, in web development, since here you can contribute HTML, and for python beginners knowing Flask

  3. CSV_Tabler - C++

@adi-g15
adi-g15 / aliasIssue.js
Last active August 17, 2020 20:25
Mongoose Scripts
const { Schema, model, connect } = require("mongoose");
connect('mongodb://localhost:27017/test', { useNewUrlParser: true, useCreateIndex: true }, (err) => {
if (!err) {
console.log('MongoDB Connection Succeeded.');
} else {
console.log('Error in DB connection: ' + err);
}
});