Skip to content

Instantly share code, notes, and snippets.

View choyan's full-sized avatar
🎯
Focusing

Zahidul Hossain choyan

🎯
Focusing
View GitHub Profile

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?
@choyan
choyan / .zshrc
Last active August 30, 2022 21:50
My oh-my-zsh settings for elementary OS
# =============================================================================
# Functions
# =============================================================================
powerlevel9k_random_color(){
printf "%03d" $[${RANDOM}%234+16] #random between 16-250
}
zsh_wifi_signal(){
local signal=$(nmcli -t device wifi | grep '^*' | awk -F':' '{print $6}')
local color="yellow"
@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">
@choyan
choyan / Listbox.jsx
Last active June 22, 2022 03:39
React Hook Form 6 + Headless UI
const languageList = [
{ name: 'English', short: 'en' },
{ name: 'Türkçe', short: 'tr' },
{ name: 'Arapça', short: 'ar' },
];
<Controller
control={control}
name="language"
defaultValue={{ name: 'English', short: 'en' }}

[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,

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);
};
@choyan
choyan / yup schema.md
Last active November 10, 2021 09:38
Yup schema definitions
const schema = yup.object().shape({
  name: yup.string().required('Bu alan zorunludur'),
  email: yup.string('Doğru bir email format değildir').email().required('Bu alan zorunludur'),
  phone: yup
    .number('Doğru bir telefon numara format değildir')
    .positive()
    .transform((v, o) => (o === '' ? null : v))
    .nullable()
    .required('Bu alan zorunludur'),