Skip to content

Instantly share code, notes, and snippets.

View choyan's full-sized avatar
🎯
Focusing

Zahidul Hossain choyan

🎯
Focusing
View GitHub Profile
@choyan
choyan / index.html
Created July 3, 2022 14:16
Tariq vai
<!DOCTYPE HTML>
<html>
<head>
<!-- <title>Dimension by HTML5 UP</title> -->
<title>Tariq Ridwan | personal website</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="assets/css/main.css" />
<link rel="stylesheet" href="assets/css/academicons.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jpswalsh/academicons@1/css/academicons.min.css">

[00:10:28]

What do you think separates a good react engineer from a great react engineer? It's a good question. What separates a good react engineer from a great react engineer? I don't know if I can think of anything that's gonna be particularly tailored to react. In general, the best engineers that I've worked with communicate super well.

[00:10:55] And when I say that they, like let's say, I come into your office and I say, hey, I need you to build this new search functionality that allows users to checkout faster or something like that, right? A good engineer is going to ask a lot of follow up questions so that they can get the product requirements down to like, okay, we need to build this and this and this and so they understand the problem domain really, really well before they start working on something.

[00:11:23] That has been historically that the engineers I've seen that perform the best at can take something that's really ambiguous and distill it down to step by step steps that they can t

function getFileNameFromPath(filePath: string): string {
return filePath.substring(filePath.lastIndexOf('/') + 1);
}
function getShortName(fileName: string): string {
if (fileName.length > 30) {
return fileName.slice(0, 30) + '...' + fileName.split('.').pop();
}
return fileName;
}

Install libffmpeg.so for Vivaldi and Opera

Troubleshooting videos issues in chromium based browsers

WARNING

Be aware that this manipulation could cause your browser to not launch anymore or make your pages crash !
So be sure to have a backup of your datas before doing it.

Find the chromium version your browser is based on

Goto opera://about or vivaldi://about,
then Ctrl+F to find 'Chrome' in the user-agent,

React App Exercise

In this code challenge, we would like to assess your skills and knowledge in areas that matter to us, and we work with on a daily basis.

What we review:

  • Architecture: how clean is the separation of components, folder structuring and design patterns?
  • React Skills: state management, routing, performance and optimisations, etc.
  • Code Quality: are namings across the code appropriate? Is the code reusable and readable? Are there any ESLint issues?
  • Documentation: are technical choices and trade-offs explained?
import { useState } from "react";
import { Tab, Tabs, TabList, TabPanel } from "react-tabs";
import "react-tabs/style/react-tabs.css";
export default function App() {
const [tabIndex, setTabIndex] = useState(0);
const goToTabOne = () => {
setTabIndex(0);
};

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;
@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) =>