Skip to content

Instantly share code, notes, and snippets.

View choyan's full-sized avatar
🎯
Focusing

Zahidul Hossain choyan

🎯
Focusing
View GitHub Profile

Kodeeo is looking for a Mid-level React Developer

Job Title: Mid-Level React Developer

Requirements:

  • Solid understanding of React
  • Experience with Functional Component and Hooks.
  • Ability to Develop UI from scratch.
  • Experience with consuming REST API.
  • Previous experience with TailwindCSS or Material-UI is a Big Plus.
@choyan
choyan / main.js
Last active October 21, 2021 17:55
Türk cep telefonu numarası formatı. Turkish Phone Code format. (Javascript)
// Inspired from this answer by maerics https://stackoverflow.com/a/8358141/1648286
function phoneNumberFormatView(phoneNumberString) {
let cleaned = ('' + phoneNumberString).replace(/\D/g, '');
let match = cleaned.match(/^(90|)?(\d{3})(\d{3})(\d{2})(\d{2})$/);
if (match) {
let intlCode = (match[1] ? '+90 ' : '');
return [intlCode, match[2], ' ', match[3], ' ', match[4], ' ', match[5]].join('');
}
return null;
const list = [
1, 12, 2, 3, 1, 1, 2, 3, 1, 3, 4, 3, 1, 5, 0, 3, 2, 1, 9, 19, 1, 19, 5, 23, 2,
23, 13, 27, 1, 10, 27, 31, 2, 31, 6, 35, 1, 5, 35, 39, 1, 39, 10, 43, 2, 9,
43, 47, 1, 47, 5, 51, 2, 51, 9, 55, 1, 13, 55, 59, 1, 13, 59, 63, 1, 6, 63,
67, 2, 13, 67, 71, 1, 10, 71, 75, 2, 13, 75, 79, 1, 5, 79, 83, 2, 83, 9, 87,
2, 87, 13, 91, 1, 91, 5, 95, 2, 9, 95, 99, 1, 99, 5, 103, 1, 2, 103, 107, 1,
10, 107, 0, 99, 2, 14, 0, 0,
];
const chunkSize = 4;

Include multiple class inside CSS module

<footer className={ `${styles.footerArea} ${styles.footerLight}` }>

MULTIPLE CONDITIONAL RENDERINGS IN REACT with ENUM

<TableCell align="center">
  {
    {
      'None': <p>We are not sure about this email.</p>,
@choyan
choyan / createCrudHooks.js
Created August 20, 2021 23:56 — forked from tannerlinsley/createCrudHooks.js
A naive, but efficient starter to generate crud hooks for React Query
export default function createCrudHooks({
baseKey,
indexFn,
singleFn,
createFn,
updateFn,
deleteFn,
}) {
const useIndex = (config) => useQuery([baseKey], indexFn, config)
const useSingle = (id, config) =>
# import libraries
import pandas as pd
import seaborn as sns
import flair
# configure size of heatmap
sns.set(rc={'figure.figsize':(35,3)})
# function to visualize
def visualise_sentiments(data):
@choyan
choyan / wwwemirasgroup.conf.sh
Last active June 18, 2021 13:18
Nginx configuration for domain, sub-domain and reverse proxy serup
# server blocks for incoming HTTP requests
# https://stackoverflow.com/questions/64955127/nginx-multiple-node-apps-with-multiple-subdomains
# https://stackoverflow.com/questions/5009324/node-js-nginx-what-now?noredirect=1&lq=1
server {
listen 80;
listen [::]:80;
server_name emirasgroup.com www.emirasgroup.com;
# redirect any HTTP request to HTTPS
return 301 https://$http_host$request_uri;
}

Installation Procedure

Need to have Node and JDK installed.

For JDK

sudo apt install openjdk-8-jdk

Download and install Android Studio https://developer.android.com/studio/index.html

@choyan
choyan / seller-dashboard.html
Created March 2, 2021 09:08
seller-dashboard.html
<!--
This example requires Tailwind CSS v2.0+
This example requires some changes to your config:
```
// tailwind.config.js
const colors = require('tailwindcss/colors')
module.exports = {
https://iconscout.com/illustrations/
https://www.manypixels.co/gallery/
https://isometric.online/
https://www.opendoodles.com/
https://www.glazestock.com/
https://fresh-folk.com/
https://mixkit.co/
http://drawkit.io/