Skip to content

Instantly share code, notes, and snippets.

View SergeyLitvin's full-sized avatar

Serhij Lytvyn SergeyLitvin

  • Epic Games
  • Kharkiv region, Zmiiv
View GitHub Profile
@SergeyLitvin
SergeyLitvin / Update npm
Last active February 28, 2019 21:25
Update npm to last version
Run PowerShell as Administrator
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install -g npm-windows-upgrade
npm-windows-upgrade -p -v latest
/* Reset */
body,div,dl,dt,dd,ul,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,input,textarea,p,blockquote,th,td{
margin: 0;
padding: 0;
}
table{
border-collapse: collapse;
border-spacing: 0;
}
@SergeyLitvin
SergeyLitvin / js_comment
Created February 17, 2019 20:34
JS comment block style
/* ==================================================
JS comment block style
================================================== */
@SergeyLitvin
SergeyLitvin / html_comments
Last active May 17, 2021 13:00
HTML block comment teamplate
<!-- ==================================================
HTML block comment
================================================== -->
@SergeyLitvin
SergeyLitvin / css_comments
Last active February 17, 2019 20:29
CSS comments style and teamplate
/* ==========================================================================
Style block comment
========================================================================== */
@SergeyLitvin
SergeyLitvin / main.js
Last active April 13, 2018 20:31
OOP - Functional style
// Функция конструктор (способ создания в функциональном стиле ООП) - не приветствуется
function Animal(legs) {
this.legs = legs;
this.walks = function(){
return 'Proudly walks on all ' + this.legs + ' legs';
}
// Создание экземпляра класса
let animal = new Animal(4);
console.log(animal); //{ legs: 4, walks: [Function] }