Skip to content

Instantly share code, notes, and snippets.

@karthink
karthink / avy-actions.el
Last active January 21, 2024 00:32
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 May 14, 2024 21:23
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
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 May 30, 2024 06:40
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