Skip to content

Instantly share code, notes, and snippets.

View ovichowdhury's full-sized avatar
🏠
Working from home

Nahid Chowdhury ovichowdhury

🏠
Working from home
View GitHub Profile
@ovichowdhury
ovichowdhury / Accounting101.sql
Created May 6, 2025 12:46
Basic Accounting DB and Common Reports
CREATE TABLE accounts (
account_id SERIAL PRIMARY KEY,
account_name VARCHAR(100) NOT NULL,
account_type VARCHAR(20) NOT NULL -- 'Asset', 'Liability', 'Equity', 'Income', 'Expense'
);
CREATE TABLE transactions (
transaction_id SERIAL PRIMARY KEY,
account_id INTEGER REFERENCES accounts(account_id),
transaction_date DATE NOT NULL DEFAULT CURRENT_DATE,
@ovichowdhury
ovichowdhury / DotNet.md
Created December 26, 2024 16:23
Essential Commands for .NET Development in VS Code

For creating a solution

dotnet new sln -n SolutionName

For creating a project

dotnet new webapi -n Todo.API

For listing out all available projects

@ovichowdhury
ovichowdhury / Maps.tsx
Created February 25, 2024 09:51
Google Maps Integration with React
import React, { useEffect, useState } from 'react'
import {
APIProvider,
Map,
AdvancedMarker,
Pin,
InfoWindow,
MapMouseEvent,
useMap,
useMapsLibrary,
@ovichowdhury
ovichowdhury / openssl.txt
Created January 5, 2023 07:57
Open SSL RSA key generate
# generate a private key with the correct length
openssl genrsa -out private-key.pem 3072
# generate corresponding public key
openssl rsa -in private-key.pem -pubout -out public-key.pem
# optional: create a self-signed certificate
openssl req -new -x509 -key private-key.pem -out cert.pem -days 360
# optional: convert pem to pfx
@ovichowdhury
ovichowdhury / apache_bench.txt
Created August 31, 2022 05:47
Apache Bench Test Commands.
# -c = Number of concurrent request
# -n = Total Number of Request
# -p = Post Request
# for get request
ab -c 10 -n 500 https://127.0.0.1:5060/faceapi/encodings
# for post request
ab -p body_encodings.json -T application/json -c 10 -n 500 -l http://127.0.0.1:5060/faceapi/encodings
@ovichowdhury
ovichowdhury / ElasticSearch.txt
Last active August 1, 2022 09:29
Elasticsearch query and configuration.
### Search All Indices
GET _search
{
"query": {
"match_all": {}
}
}
### Cluster Health check
GET /_cluster/health
@ovichowdhury
ovichowdhury / Linux.txt
Created July 26, 2022 04:54
Linux Commands
# Create a linux user
> sudo adduser <name> --home /home/<name>
> sudo usermod -aG sudo <username>
@ovichowdhury
ovichowdhury / introrx.md
Created June 21, 2022 05:52 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@ovichowdhury
ovichowdhury / git-2.txt
Last active April 9, 2023 07:21
Git Advanced Commands
*** Keep feature branch up to date with main ***
//in feature branch
git fetch
git rebase origin/main
// if conflict arise and resolved manually
git rebase --continue
git push --force
@ovichowdhury
ovichowdhury / dlib_with_gpu.txt
Last active August 14, 2022 06:24
Nvidia Geforce RTX 3090 ti Setup in Ubuntu 20.04 for Tensorflow >= 2.5
# for cuda memory allocation error
# add this line so that memory can grow by tf
# face_service.py
from tensorflow as tf
physical_devices = tf.config.experimental.list_physical_devices('GPU')
tf.config.experimental.set_memory_growth(physical_devices[0], True)