Skip to content

Instantly share code, notes, and snippets.

View mingbackmountain's full-sized avatar

Thanakorn Pasangthien mingbackmountain

  • Mahidol University
  • Thailand
View GitHub Profile
@wojteklu
wojteklu / clean_code.md
Last active May 3, 2025 15:43
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

@robabby
robabby / media-queries
Last active October 30, 2022 13:17
A comprehensive list of media queries forked from Bootstrap and Foundation frameworks
// Bootstrap
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
/* Extra Small Devices, Phones */
@media only screen and (min-width : 480px) {
@alexhawkins
alexhawkins / nativeJavaScript.js
Last active November 1, 2024 12:00
Implementation of Native JavaScript Methods (forEach, Map, Filter, Reduce, Every, Some)
'use strict';
/*****************NATIVE forEACH*********************/
Array.prototype.myEach = function(callback) {
for (var i = 0; i < this.length; i++)
callback(this[i], i, this);
};
//tests
@davidwparker
davidwparker / 008.c
Created September 5, 2011 20:31
OpenGL Screencast 8: Drawing in 3d part 3: spheres, cylinders, and cones
#include "screencasts.h"
/* Poor man's approximation of PI */
#define PI 3.1415926535898
/* Macro for sin & cos in degrees */
#define Cos(th) cos(PI/180*(th))
#define Sin(th) sin(PI/180*(th))
/* D degrees of rotation */
#define DEF_D 5