Skip to content

Instantly share code, notes, and snippets.

@karthink
karthink / avy-actions.el
Last active September 2, 2024 09:41
Supplementary code for Avy actions for Emacs
;; Code used in the demos at https://karthinks.com/software/avy-can-do-anything
;; Tweak as desired.
(package-install 'avy)
(setq avy-keys '(?q ?e ?r ?y ?u ?o ?p
?a ?s ?d ?f ?g ?h ?j
?k ?l ?' ?x ?c ?v ?b
?n ?, ?/))
@wmcmurray
wmcmurray / BasicCustomShader.js
Last active September 21, 2024 13:44
A basic example of a ThreeJS (r108) ShaderMaterial with shadows, fog and dithering support.
import { mergeUniforms } from 'three/src/renderers/shaders/UniformsUtils.js'
import { UniformsLib } from 'three/src/renderers/shaders/UniformsLib.js'
export default {
uniforms: mergeUniforms([
UniformsLib.lights,
UniformsLib.fog,
]),
@cadurosar
cadurosar / test_notebook.ipynb
Last active August 4, 2023 22:19
A interactive ipython notebook for: Keras plays catch - https://gist.github.com/EderSantana/c7222daa328f0e885093
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jboner
jboner / latency.txt
Last active November 15, 2024 14:00
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