Skip to content

Instantly share code, notes, and snippets.

View romanzhivo's full-sized avatar
🇷🇺

Roman Zhivotyagin romanzhivo

🇷🇺
View GitHub Profile
@victor-homyakov
victor-homyakov / APIs affecting bfcache.md
Last active May 6, 2024 11:20
API, которые влияют на попадание страницы в bfcache
  • ✔︎ - не мешает попаданию страницы в bfcache
  • ✘ - запрещает попадание страницы в bfcache
  • пустая ячейка - влияние неизвестно
API Firefox Safari Chromium IE
Подписка на beforeunload
Подписка на unload
Незавершённые запросы XHR/fetch ✘ в планах прерывать запрос и вызывать onerror при восстановлении страницы
Незавершённые запросы за ресурсами ✘ кроме favicon
@andreasonny83
andreasonny83 / README.md
Created July 20, 2019 13:07
Run node app in background

Run node app in background

Running a script in the background in linux can be done using nohup, using nohup we can run node application in the background

$ nohup node server.js > /dev/null 2>&1 &
  • nohup means: Do not terminate this process even when the stty is cut off
  • > /dev/null means: stdout goes to /dev/null (which is a dummy device that does not record any output)
@romanzhivo
romanzhivo / sberbank-my-credit-payments.js
Last active August 23, 2019 21:48
Сбербанк: функция подсчёта переплаты по ипотеке и полной стоимости ипотеки
// Подсчёт суммы переплаты:
// не передавать аргументов или указать аргументом одну из строк: 'процент' или percent'
// Подсчёт общей суммы, включая переплату
// в качестве аргумента указать одну из строк: 'сумма' или total'
function getMyPayments(type) {
var creditID = window.location.search.substr(4);
var isParamID = window.location.search.substr(1,2) === 'id';
@henriquemoody
henriquemoody / http-status-codes.php
Last active January 26, 2024 10:29
List of HTTP status codes in PHP
<?php
/**
* Content from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
*
* You may also want a list of unofficial codes:
*
* 103 => 'Checkpoint',
* 218 => 'This is fine', // Apache Web Server
* 419 => 'Page Expired', // Laravel Framework
@DmitrySoshnikov
DmitrySoshnikov / shunting-yard-algorithm.js
Last active April 14, 2024 05:00
Shunting yard algorithm
/**
* Shunting yard algorithm
* See: http://en.wikipedia.org/wiki/Shunting_yard_algorithm
*
* Converts infix notation to postfix notation
*
* by Dmitry Soshnikov <dmitry.soshnikov@gmail.com>
* MIT Style License
*
* (C) 2011, updated on 2020