Skip to content

Instantly share code, notes, and snippets.

View retran's full-sized avatar
:octocat:

Andrew Vasilyev retran

:octocat:
View GitHub Profile
@devx00
devx00 / LiveCoding Instructions
Created July 11, 2015 19:37
Instructions to setup external streaming and chatting for livecoding.tv streams
// ************** Instructions for connecting to the LiveCoding chatrooms from a 3rd party application. ****************
Step 1a (Ubuntu/ any OS with aptitude (aka apt-get)) :
sudo apt-add-repository ppa:rsrchboy/profanity && sudo apt-get update
apt-get install profanity
--
Step 1b (OSX w/ homebrew):
$ brew install profanity
--------
@LearnCocos2D
LearnCocos2D / gist:77f0ced228292676689f
Last active February 12, 2024 20:47
Overview of Entity Component System (ECS) variations with pseudo-code

For background and further references see: Entity Component Systems on Wikipedia

ECS by Scott Bilas (GDC 2002)

Entity->Components->Update
  • entity = class: no logic + no data OR at most small set of frequently used data (ie position)
  • component = class: logic + data
foreach entity in allEntities do
    foreach component in entity.components do
@davidfowl
davidfowl / dotnetlayout.md
Last active May 3, 2024 08:40
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@jboner
jboner / latency.txt
Last active May 3, 2024 15:17
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD