Skip to content

Instantly share code, notes, and snippets.

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

Jubyer Ahmed Shezan jashezan

🏠
Working from home
View GitHub Profile
/** @type {import('express').RequestHandler} */
@jashezan
jashezan / .prettierrc.js
Created November 18, 2023 13:57
.prettierrc.js from React.js or Next.js
export default {
printWidth: 120, // max 120 chars in line, code is easy to read
useTabs: false, // use spaces instead of tabs
tabWidth: 2, // "visual width" of of the "tab"
trailingComma: 'es5', // add trailing commas in objects, arrays, etc.
semi: true, // add ; when needed
singleQuote: true, // '' for stings instead of ""
bracketSpacing: true, // import { some } ... instead of import {some} ...
arrowParens: 'always', // braces even for single param in arrow functions (a) => { }
jsxSingleQuote: false, // "" for react props, like in html
@jashezan
jashezan / .bash_aliases
Created October 21, 2023 08:25
Bash Aliases for Arch Linux
# alias set
alias cls="clear"
alias dtgr="echo 'running: sudo pacman -Syu'; sudo pacman -Syu"
alias ud="echo 'running: sudo updatedb'; sudo updatedb"
alias bat="batcat"
alias purge="echo -n '\nRunning sudo pacman -Rns $(pacman -Qtdq) && sudo pacman -Sc\n\n'; sudo pacman -Rns $(pacman -Qtdq) && sudo pacman -Sc"
# alias docker="sudo docker"
alias mv="mv -i"
# complex command
@jashezan
jashezan / .bash_aliases
Created October 18, 2023 16:44
Bash Aliases
# alias set
alias cls="clear"
alias dtgr="echo 'running: sudo apt update && sudo apt upgrade'; sudo apt update && sudo apt -y upgrade"
alias ud="echo 'running: sudo updatedb'; sudo updatedb"
alias bat="batcat"
alias purge="echo -n '\nRunning sudo apt autopurge, autoremove, autoclean\n\n'; sudo apt autopurge; sudo apt autoremove; sudo apt autoclean;"
# alias docker="sudo docker"
alias mv="mv -i"
# complex command
@jashezan
jashezan / index.css
Last active November 24, 2023 21:17
Remove Arrow on Input type Number with Tailwind CSS
@layer base {
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button,
input[type="number"] {
@apply [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none;
}
}
/* General CSS can also be added in tailwind.config.js file */
@jashezan
jashezan / focus_on_next_input.html
Created May 16, 2023 18:11
On Enter keypress, I want to go to next input field
<!DOCTYPE html>
<html>
<head>
<title>Focus Next Input Field on Enter</title>
</head>
<body>
<input type="number" class="input-field" />
<input type="number" class="input-field" />
<input type="number" class="input-field" />
@jashezan
jashezan / meta-tags.md
Created February 8, 2023 20:15 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@jashezan
jashezan / Adding suffix to file in linux.md
Last active November 16, 2022 19:34
Adding suffix to file in linux

Adding suffix to file in linux

# adding_suffix_to_file.sh
# suppose the file have `ext` extension
mv "$file" "${file%.*}_suffix.ext"

This is Normalize CSS file

/* Sources: https://piccalil.li/blog/a-modern-css-reset/ */

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;