This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
process.stdout.write("\x07") // beep sound | |
process.stdout.write('\u001B[2J\u001B[0;0f'); // clear console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fixes bugs | |
* { | |
backface-visibility: hidden; | |
perspective: 600px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let queued = false | |
textarea.addEventListener('input', () => { | |
if (!queued) { | |
queued = true | |
requestIdleCallback(() => { | |
updateUI(textarea.value) | |
queued = false | |
}) | |
} | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi | |
export FORCE_COLOR="1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |