Skip to content

Instantly share code, notes, and snippets.

View darosh's full-sized avatar
🏠
Working from home.

Jan Forst darosh

🏠
Working from home.
View GitHub Profile
@wojteklu
wojteklu / clean_code.md
Last active May 6, 2024 20:13
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

SailsJS v1.0

This is just a list of changes that I would like to see in SailsJS v1.0. Many of these are breaking changes, but this is a major version bump, so now is the time to make these changes. It’s worth the upgrade pain to make some much-needed improvements to the framework and remove some legacy bloat and code smell.

Top Priorities:

Upgrade to Express 4.0

  • Or Express 5.0, if it’s at least in beta by then

Trim-down SailsJS Core by moving a bunch of stuff to plug-ins (hooks)

  • Remove Grunt, EJS, and LESS from SailsJS Core
@fanzeyi
fanzeyi / scroll.css
Created November 1, 2012 18:34
Google Plus Scroll Style
::-webkit-scrollbar{
height:16px;
overflow:visible;
width:16px;
}
::-webkit-scrollbar-button{
height:0;
width:0;
}
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>JS Template Benchmarks: Underscore</title>
<link rel="stylesheet" href="styles.css" type="text/css" media="screen" charset="utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script src="jquery.benchmark.js" type="text/javascript" charset="utf-8"></script>
<script src="http://github.com/pure/pure/raw/master/libs/pure.js"></script>
</head>
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>JS Template Benchmarks: Mustache.js</title>
<link rel="stylesheet" href="styles.css" type="text/css" media="screen" charset="utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script src="jquery.benchmark.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.mustache.js" type="text/javascript" charset="utf-8"></script>
</head>