Skip to content

Instantly share code, notes, and snippets.

View zakhaev26's full-sized avatar
💭
I may be slow to respond.

Soubhik Gon zakhaev26

💭
I may be slow to respond.
View GitHub Profile
@zakhaev26
zakhaev26 / template.cpp
Last active June 22, 2025 04:54
CP template (local debuggers too)
#include <bits/stdc++.h>
using namespace std;
#ifdef OJ
template <typename T> void __print(const T &x) { cerr << x; }
template <typename T, typename U> void __print(const pair<T,U> &x) { cerr << "("; __print(x.first); cerr << ", "; __print(x.second); cerr << ")"; }
template <typename T> void __print(const vector<T> &v) { cerr << "["; for (size_t i = 0; i < v.size(); ++i) __print(v[i]), cerr << (i+1==v.size()?"":", "); cerr << "]"; }
template <typename T> void __print(const vector<vector<T>> &v) { cerr << "[\n"; for (auto &r : v) cerr << " ", __print(r), cerr << "\n"; cerr << "]"; }
template <typename T> void __print(const set<T> &s) { cerr << "{"; for (auto it = s.begin(); it != s.end(); ++it) __print(*it), cerr << (next(it)==s.end()?"":", "); cerr << "}"; }
template <typename T> void __print(const unordered_set<T> &s) { __print(set<T>(s.begin(), s.end())); }
@zakhaev26
zakhaev26 / setup.sh
Created September 3, 2024 09:08
setup.sh
#!/bin/bash
# Define some colors for better output
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m' # No Color
echo -e "${GREEN}Starting development environment setup...${NC}"
# 1. Update the package list
@zakhaev26
zakhaev26 / sql_resources.md
Created July 26, 2024 15:49 — forked from momer/sql_resources.md
SQL learning Resources for Beginners

There are a number of good introductory SQL resources available for free and online. There are also some paid resources which I recommend for beginners, that are very effective, and well worth expensing in my opinion.

A couple of notes:

  • I haven’t used all of these resources, but they come with strong recommendations around the web or myself/my peers.
  • You absolutely don’t need to use every single resource. Find a couple that work for you, and go to town.
  • You can always reach out to me if you have questions. I always paste this online when people are new to asking very technical questions – it’s not meant to be snarky – it's a gentle guide on how to compose your questions and gather necessary resources in order to best give technical people the information needed to get a quick/effective response: http://www.mikeash.com/getting_answers.html

Video/Class/Mini-course based:

  1. Stanford Self-paced ‘Database’ course
  • The original Coursera
@zakhaev26
zakhaev26 / App.css
Created February 13, 2024 11:24
Hosted Links You might need for the session :D
body {
margin: 0;
font-family: Arial, sans-serif;
background-color: #1f1f1f;
color: #eee;
}
.app {
display: flex;
flex-direction: column;
@zakhaev26
zakhaev26 / README.md
Created December 29, 2023 07:31 — forked from piyushgarg-dev/README.md
Kafka Crash Course
@zakhaev26
zakhaev26 / newton-forward.py
Created July 26, 2023 13:38
Interpolation Algorithms
def fact(num):
if(num==0 or num==1):
return 1
else:
return num*fact(num-1)
def nablaFunction(dataset__fx):
if(len(dataset__fx)==1):
return
iterations = len(dataset__fx)
@zakhaev26
zakhaev26 / vercel.gradient.text.css
Created July 11, 2023 17:22
vercel-text-styling-gradient.css
.gradient-text {
background-image: linear-gradient(45deg, #ff00cc, #3333ff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
@zakhaev26
zakhaev26 / freecodecamp-ref.txt
Last active July 11, 2023 09:07
Context API in React JS
https://www.freecodecamp.org/news/context-api-in-react/

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Create Free AWS Account

Create free AWS Account at https://aws.amazon.com/

2. Create and Lauch an EC2 instance and SSH into machine

I would be creating a t2.medium ubuntu machine for this demo.