Skip to content

Instantly share code, notes, and snippets.

@DmitrySoshnikov
DmitrySoshnikov / classes.txt
Created May 17, 2011 18:19
Classification of classes
// by Dmitry Soshnikov <dmitry.soshnikov@gmail.com>
// MIT Style License
*Classification of classes:*
=============================================================================
| Dynamic | Static
-----------------------------------------------------------------------------
| |
| Coffee, Python, Ruby, | SmallTalk, built-in
@vasanthk
vasanthk / System Design.md
Last active July 8, 2024 22:11
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@alekseykulikov
alekseykulikov / index.md
Last active April 14, 2024 00:32
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@sdhunt
sdhunt / functions.js
Created January 20, 2018 04:32
Some examples of function definitions and function expressions in ES5 and ES6
// Examples of the different forms of functions
// First, "traditional" function definitions (ES5 and earlier)
// (1) named function
function mult(a, b) {
return a * b;
}
console.log(mult(3, 5));
@getify
getify / 1.js
Last active July 27, 2023 15:50
demonstrating how to use "nodegit" to modify and read from a local bare git repo
/*
NOTE: This code assumes a bare git repo in ./bare-git/,
which should have at least one text file in its root,
named "greetings.txt".
This code updates the contents of a "greetings.txt"
file, and creates a new file called "greetings-XXX.txt"
(with XXX being a random number). It then creates a new
commit for these changes. Finally, it reads and dumps
the new current contents of the repo, file by file.
.row {
width: 100%;
display: flex;
flex-wrap: wrap;
}
.col-1 {
width: 8.33%
}