Skip to content

Instantly share code, notes, and snippets.

npofopr / lazy-loading.html
Created Jan 31, 2020 — forked from droganaida/lazy-loading.html
Intersection Observer + custom lazy loading demo
View lazy-loading.html
<title>Lazy loading by #Blondiecode</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
body {
font-family: Arial, "Helvetica Neue", Helvetica, serif;
footer {
npofopr / Get UiKit 3 scss & css variables color
Last active Jun 11, 2019
Variables Theme use this with a basic uikit
View Get UiKit 3 scss & css variables color
Variables Theme
use this with a basic uikit
Change [data-theme="default"] for body
:root, [data-theme="default"] {
--primary: 266, 100%;
View BX Panel and fixed header
$(document).ready(function() {
if ($("#panel").length != 0) {
} else {
npofopr / sw.js
Created Dec 29, 2018 — forked from ireade/sw.js
Handle broken images with the service worker
View sw.js
self.addEventListener('install', (e) => {
e.waitUntil("precache").then((cache) => cache.add("/broken.png"))
function isImage(fetchRequest) {
return fetchRequest.method === "GET" && fetchRequest.destination === "image";
npofopr / nodejs-gulp-install.txt
Last active Dec 16, 2018 — forked from agragregra/nodejs-gulp-install.txt
Node.js + Gulp installation (Ubuntu) one line command
View nodejs-gulp-install.txt
1. Simple:
sudo apt-add-repository -y ppa:brightbox/ruby-ng; sudo apt-get update; sudo apt-get -y install curl ruby2.5 ruby2.5-dev gcc make g++ libffi-dev; curl -sL | sudo -E bash -; sudo apt-get install -y nodejs;
npm i -g rimraf npm-check-updates;
sudo chown -R $USER:$(id -gn $USER) /home/$USER/.config
3. Длинна командной строки (добавить PROMPT_DIRTRIM=3 в конец и сохранить файл):
sudo nano ~/.bashrc
npofopr / Add_Open_Bash_context_menu.reg
Last active May 18, 2020
Добавление пункта "Открыть окно Bash здесь" для работы с Ubuntu shell в текущей папке Windows 10
View Add_Open_Bash_context_menu.reg
Windows Registry Editor Version 5.00
; Created by:Shawn Brink
; Created on: August 13th 2016
; Tutorial:
@="Открыть окно Bash здесь"
npofopr / DNS prefetching preconnect
Last active Dec 29, 2020
Common Prefetch Links
View DNS prefetching preconnect
<!-- DNS preconnect -->
<meta http-equiv="x-dns-prefetch-control" content="on">
<link rel="preconnect" href="//">
<link rel="dns-prefetch" href="">
<link rel="preconnect" href="" crossorigin="anonymous">
<link rel="dns-prefetch" href="">
<link rel="preconnect" href="" crossorigin>
<link rel="preconnect" href="//">
<link rel="preconnect" href="//">
<link rel="preconnect" href="//">
View Ад, Песнь пятая
height: unset;
height: inherit;
height: There standeth Minos horribly, and snarls;
examines the transgressions at the entrance;
judges, and sends according as he girds him. (The Inferno, Canto V);
/* Здесь ждет Минос, оскалив страшный рот;
Допрос и суд свершает у порога
И взмахами хвоста на муку шлет. (Ад, Песнь пятая)
Данте Алигьери. Божественная комедия, перевод М. Лозинского */
View bootstrap-dropdown.js
* Bootstrap v3.3.5 (
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (
* Generated using the Bootstrap Customizer (
* Config saved to config.json and
View browse happy
.browse-happy {display:block;width:768px;height:120px;background-color:#cd3c18;color: #fff !important;margin: 0;font-size: 16px;line-height: 1.4;color: #333;position: fixed;z-index: 9999;top: 50%;left: 50%;margin-top: -60px;margin-left: -384px;padding: 20px 40px;text-align: justify}
.browse-happy a {color: #fff; text-decoration: underline;text-decoration-skip:ink}
<!--[if lt IE 10]>
<div class="browse-happy">
<p class="browse-happy__notice">Мы обнаружили, что вы используете <strong>устаревшую версию</strong> браузера Internet Explorer</p>
<p class="browse-happy__security">Из соображений безопасности этот сайт поддерживает Internet Explorer версии 10 и выше