Skip to content

Instantly share code, notes, and snippets.

0x89b1959823bF3a9621C4a028B0448b22E44f9dE8
@chrislatorres
chrislatorres / clean_code.md
Created June 9, 2018 15: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

@chrislatorres
chrislatorres / VelocityBezier.cs
Created September 27, 2018 22:50 — forked from jselstad/VelocityBezier.cs
Kinematic Interpretation of a Cubic Bezier Curve - For Unity
// This function evaluates points along a bezier curve given by a starting position and velocity, and an ending position and velocity
// This can be thought of as interpolating between two linear trajectories
public static Vector3 cubicBezier(Vector3 aStart, Vector3 aVel, Vector3 bEnd, Vector3 bVel, float duration, float time) {
float alpha = time / duration; //Normalize the time
Vector3 aEnd = aStart + (aVel * duration); //Where it would end up if it were just A's dynamics
Vector3 bStart = bEnd - (bVel * duration); //Where it would start if it were just B's dynamics
return
(Mathf.Pow(1 - alpha, 3f) * aStart) +
(3f * Mathf.Pow(1 - alpha, 2f) * alpha * aEnd) +
@chrislatorres
chrislatorres / build_curl.md
Created October 8, 2018 21:37 — forked from bertrandmartel/build_curl.md
Build Curl for Android NDK

Build libcurl for android NDK

Libcurl requires openssl and zlib to be fully operationnal

  • Step 1 : cross compile zlib
  • Step 2 : cross compile openssl
  • Step 3 : cross compile curl with zlib/openssl external link

Prerequisites :

@chrislatorres
chrislatorres / .gitignore
Created October 13, 2018 05:22 — forked from brianpeiris/.gitignore
Exokit Magic Leap fast feedback
node_modules
package-lock.json
@chrislatorres
chrislatorres / .gitignore
Created October 13, 2018 05:22 — forked from brianpeiris/.gitignore
Exokit Magic Leap fast feedback
node_modules
package-lock.json
@chrislatorres
chrislatorres / richhickey.md
Created October 24, 2018 18:06 — forked from prakhar1989/richhickey.md
richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

<html>
<head>
<style>
body {
margin: 0;
}
</style>
</head>
<body>
<script src="three.js"></script>
/mnt/c/Users/chris/MagicLeap/mlsdk/v0.19.0/tools/toolchains/bin/aarch64-linux-android-clang++ '-DNODE_GYP_MODULE_NAME=exokit' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DNOMINMAX' '-DLUMIN' '-DWRAPPING_CEF_SHARED' '-DWEBRTC_POSIX' '-DBUILDING_NODE_EXTENSION' -I/mnt/c/Users/chris/exokit/.node-gyp/10.14.2/include/node -I/mnt/c/Users/chris/exokit/.node-gyp/10.14.2/src -I/mnt/c/Users/chris/exokit/.node-gyp/10.14.2/deps/openssl/config -I/mnt/c/Users/chris/exokit/.node-gyp/10.14.2/deps/openssl/openssl/include -I/mnt/c/Users/chris/exokit/.node-gyp/10.14.2/deps/uv/include -I/mnt/c/Users/chris/exokit/.node-gyp/10.14.2/deps/zlib -I/mnt/c/Users/chris/exokit/.node-gyp/10.14.2/deps/v8/include -I/mnt/c/Users/chris/exokit/node_modules/nan -I/mnt/c/Users/chris/exokit/node_modules/native-canvas-deps/include/core -I/mnt/c/Users/chris/exokit/node_modules/native-canvas-deps/include/config -I/mnt/c/Users/chris/exokit/node_modules/native-canvas-deps/