Skip to content

Instantly share code, notes, and snippets.

View EminQasimov's full-sized avatar
🎯
Focusing

Emin Qasimov EminQasimov

🎯
Focusing
View GitHub Profile

Disable HTML Form Input Autocomplete and Autofill

  1. Add autocomplete="off" onto <form> element;
  2. Add hidden <input> with autocomplete="false" as a first children element of the form.
<form autocomplete="off" method="post" action="">
    <input autocomplete="false" name="hidden" type="text" style="display:none;">
    ...
@EminQasimov
EminQasimov / GitCommitEmoji.md
Created July 26, 2022 06:08 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@EminQasimov
EminQasimov / work-hours-calculator.js
Last active April 27, 2022 11:07
Calculate Total Amount with Work hours by hourly rate.
function convertDurationtoSeconds(duration) {
const [hours, minutes, seconds] = duration.split(":")
return Number(hours) * 60 * 60 + Number(minutes) * 60 + Number(seconds)
}
function secondsToHms(d) {
d = Number(d)
var h = Math.floor(d / 3600)
var m = Math.floor((d % 3600) / 60)
var s = Math.floor((d % 3600) % 60)
const text = css({
color: '$gray12',
variants: {
size: {
// corrective letter-spacing and text-indent styles
// should go here too, because they're determined by font-size.
// You could also put line-height here too, if your devs prefer
// a default line-height that works in some cases. But understand
// that line-height is also a function of line-length, so the
@EminQasimov
EminQasimov / .bashrc
Created October 20, 2021 11:49
Git bash color fix custom ~/.bashrc file on windows , chmod +x ~/bashrc
#! /bin/bash
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
export FORCE_COLOR="1"
@EminQasimov
EminQasimov / line-clamp css
Created September 18, 2021 09:01
safari supported line clamp css
.line-clamp {
display : block;
display : -webkit-box;
-webkit-box-orient : vertical;
position : relative;
overflow : hidden;
text-overflow : ellipsis;
padding : 0 !important;
line-height: var(--line-height,1.2) !important;
}
@EminQasimov
EminQasimov / performance-trick-ui-updates.js
Last active August 9, 2021 11:07
performance trick for intensive ui updates - react rerenders, inputs
let queued = false
textarea.addEventListener('input', () => {
if (!queued) {
queued = true
requestIdleCallback(() => {
updateUI(textarea.value)
queued = false
})
}
})
@EminQasimov
EminQasimov / debug-css
Created May 21, 2020 09:19
debug css hightlight elements with background colors
/* debug css */
body * {
background-color: rgba(255, 0, 0, 0.2);
}
body * * {
background-color: rgba(0, 255, 0, 0.2);
}
body * * * {
background-color: rgba(0, 0, 255, 0.2);
}
@EminQasimov
EminQasimov / Learning resources examples-demos
Last active January 23, 2020 13:27
Learning resources examples-demos links
#1 Pure CSS Parallax
https://keithclark.co.uk/articles/pure-css-parallax-websites/demo3/
https://keithclark.co.uk/articles/pure-css-parallax-websites/
#2 Custom element for rendering 3D models and controlling them with CSS
https://keithclark.co.uk/labs/3d-model-custom-element/examples/tests/
#3 Loading CSS without blocking render
https://keithclark.co.uk/articles/loading-css-without-blocking-render/
@EminQasimov
EminQasimov / gist:06eae41539f76ee5a00abb809da2e46d
Created January 9, 2020 11:08
shaky text bug while transfrom scale hover transition
// fixes bugs
* {
backface-visibility: hidden;
perspective: 600px;
}