Skip to content

Instantly share code, notes, and snippets.

View HarshKapadia2's full-sized avatar
💛
"Kindness always wins." -Selena Gomez

Harsh Kapadia HarshKapadia2

💛
"Kindness always wins." -Selena Gomez
View GitHub Profile
#include <stdio.h>
#include <limits.h>
int main()
{
printf("an int has %lu bytes ", sizeof(int));
printf("and it can fit up to %d inside it\n", INT_MAX);
printf("a long long has %lu bytes ", sizeof(long long));
printf("and it can fit up to %lld inside it\n\n", LLONG_MAX);
@HarshKapadia2
HarshKapadia2 / label-with-title-and-name.html
Last active January 12, 2024 19:57
To print on labels and A4 pages. Code by Kartik Soneji (https://github.com/KartikSoneji) and Harsh Kapadia (https://harshkapadia.me).
<!DOCTYPE html>
<html>
<head>
<style>
@font-face {
font-family: "Anaktoria";
src: url("https://ourtech.community/static/fonts/anaktoria.woff") format("woff");
font-weight: normal;
font-style: normal;
font-display: swap;
@HarshKapadia2
HarshKapadia2 / latency.markdown
Created August 19, 2023 06:54 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@HarshKapadia2
HarshKapadia2 / cors.md
Last active April 25, 2023 01:29
All about Cross-Origin Resource Sharing (CORS)!

How to estimate effort

By Golo Roden, translated from German with the help of DeepL

Every developer knows the challenge of estimating effort for development code. Very few like to do it. Why is estimating so unpopular, why is it even necessary, and what should you look for?

Why estimate effort?

The question of why it's necessary to estimate effort at all is easy to answer. Knowing how long a task is expected to take is essential for planning who in a team can do what and when. Even across team boundaries, a certain amount of time planning is essential; after all, teams have to be coordinated and resources have to be procured. In addition, other departments such as marketing also have an interest in being involved in planning at an early stage.

@HarshKapadia2
HarshKapadia2 / readme.md
Created May 6, 2022 22:06 — forked from jimmywarting/readme.md
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@HarshKapadia2
HarshKapadia2 / my_path.md
Last active November 19, 2021 07:06
My web dev path, projects and resources.
@HarshKapadia2
HarshKapadia2 / cmd.md
Last active November 19, 2021 07:05
A guide for some basic Windows Command Prompt terms and commands
@HarshKapadia2
HarshKapadia2 / http_methods.md
Last active November 19, 2021 07:05
All about the Hyper Text Transfer Protocol!
@HarshKapadia2
HarshKapadia2 / git.md
Last active November 19, 2021 07:02
Internal working of Git.