Skip to content

Instantly share code, notes, and snippets.

@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@asabaylus
asabaylus / gist:3071099
Created July 8, 2012 14:12
Github Markdown Heading Anchors

Anchors in Markdown

To create an anchor to a heading in github flavored markdown. Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:

[create an anchor](#anchors-in-markdown)

@prakhar1989
prakhar1989 / richhickey.md
Last active November 8, 2023 17:19 — forked from stijlist/gist:bb932fb93e22fe6260b2
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:

@wojteklu
wojteklu / clean_code.md
Last active July 31, 2024 04:48
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

@AlwaysBCoding
AlwaysBCoding / notes.txt
Last active July 25, 2022 16:46
Ethereum Ðapp Development - Video 3 | The Halting Problem And Why We Need Gas
// To learn more about the halting problem check out Gary Bernhardt's series on computation
https://www.destroyallsoftware.com/screencasts
// Ethereum Yellow Paper
http://gavwood.com/paper.pdf
// Ethereum OpCodes List
http://ethereum.stackexchange.com/questions/119/what-opcodes-are-available-for-the-ethereum-evm
// Ethereum OpCodes Gas Costs
@ravibhure
ravibhure / git_rebase.md
Last active July 26, 2024 08:21
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active July 31, 2024 01:21
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@nicksam112
nicksam112 / keras_es.py
Last active November 28, 2020 16:02
Evolution Strategies with Keras
#Evolution Strategies with Keras
#Based off of: https://blog.openai.com/evolution-strategies/
#Implementation by: Nicholas Samoray
#README
#Meant to be run on a single machine
#APPLY_BIAS is currently not working, keep to False
#Solves Cartpole as-is in about 50 episodes
#Solves BipedalWalker-v2 in about 1000

Upload images to GitHub

  1. Create a new issue on GitHub.

  2. Drag an image into the comment field.

  3. Wait for the upload process to finish.

  4. Copy the URL and use it in your Markdown files on GitHub.

@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) +