Skip to content

Instantly share code, notes, and snippets.

View Chagall's full-sized avatar
:electron:
42

Fábio Alves Martins Pereira Chagall

:electron:
42
View GitHub Profile
@Chagall
Chagall / clean_code.md
Created April 4, 2022 21:03 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@Chagall
Chagall / ImportFont.css
Created April 1, 2021 00:07
How to import a font and apply it globally to your whole website
@font-face {
font-family: "Roboto Medium";
font-style: normal;
font-weight: normal;
src: url("./fonts/Roboto-Medium.eot");
src: local(''), url("./fonts/Roboto-Medium.eot?#iefix") format('embedded-opentype'), /* IE6-IE8 */
url("./fonts/Roboto-Medium.woff") format("woff"), /* Modern Browsers */
url("./fonts/Roboto-Medium.ttf") format("truetype"), /* Safari, Android, iOS */
url("./fonts/Roboto-Medium.svg#Roboto-Medium") format("svg");
/* Legacy iOS */