Skip to content

Instantly share code, notes, and snippets.

View black1277's full-sized avatar
👁️‍🗨️
I see yuo

black1277 black1277

👁️‍🗨️
I see yuo
  • Free
  • planet Earth
View GitHub Profile
@black1277
black1277 / newReset.css
Created March 3, 2022 16:11
Сброс стилей по новому
/*** The new CSS Reset - version 1.2.0 (last updated 23.7.2021) ***/
/* Remove all the styles of the "User-Agent-Stylesheet", except for the 'display' property */
*:where(:not(iframe, canvas, img, svg, video):not(svg *)) {
all: unset;
display: revert;
}
/* Preferred box-sizing value */
*,
@black1277
black1277 / DOMContentLoaded.js
Last active May 21, 2025 11:08
DOMContentLoaded
document.addEventListener("DOMContentLoaded", ()=>{
init()
})
function init(){}
// альтернатива событию DOMContentLoaded
document.onreadystatechange = function () {
if (document.readyState == "interactive") {
init()
}
@black1277
black1277 / index.js
Created November 12, 2021 20:17
Express + handlebars Boilerplate
const express = require('express')
const exphbs = require('express-handlebars')
const path = require('path')
const homeRoute = require('./routes/home')
const app = express()
app.enable('view cache')
app.set('view cache', false)
const hbs = exphbs.create({
defaultLayout: 'mains',