Skip to content

Instantly share code, notes, and snippets.

View jakeisnt's full-sized avatar
📠

Jake Chvatal jakeisnt

📠
View GitHub Profile
@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

@hdragomir
hdragomir / sm-annotated.html
Last active June 13, 2024 03:01
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@dvcrn
dvcrn / reagent-animated-example.cljs
Last active January 31, 2023 01:08
reagent react-native animation example
;; very simple example on how to use Animated with reagent
;; https://facebook.github.io/react-native/docs/animations.html
(def animated (.-Animated js/React))
(def animated-value (.-Value animated))
(def animated-view (r/adapt-react-class (.-View animated)))
(defn testview []
(r/create-class
@insipx
insipx / index.html
Created June 10, 2018 23:44
Space Invaders HTML5 Canvas
<link href='https://fonts.googleapis.com/css?family=Play:400,700' rel='stylesheet' type='text/css'>
<canvas id="game-canvas" width="640" height="640"></canvas>
@josephg
josephg / README.md
Last active June 7, 2024 09:37
Getting Zig compiling to WASM

In case anyone else wants to play with Zig on webassembly, here's what you need to do to make it work on a mac today.

1. Get LLVM 7 compiled with webassembly support.

You'll need LLVM to output to the WASM target. This has just been added by default in trunk, so if LLVM >7 is available, you might be able to just brew install llvm.

If you have wasm support already you should see:

$ llc --version
@pjobson
pjobson / syncthing_ubuntu-mint_headless.md
Last active May 16, 2024 22:27
Syncthing Ubuntu/Mint Headless

Syncthing Ubuntu/Mint Headless

Syncthing: https://syncthing.net/

Syncthing is a free, open-source peer-to-peer file synchronization application available for Windows, Mac, Linux, Android, Solaris, Darwin, and BSD. It can sync files between devices on a local network, or between remote devices over the Internet. Data security and data safety are built into the design of the software.

This is written using Linux Mint 21.2 x86_64 using kernel 5.15.0-89-generic.

I couldn't find good directions for doing this, so here we go.

#lang rosette/safe
(require rosette/lib/angelic ; provides `choose*`
rosette/lib/destruct) ; provides `destruct`
; Tell Rosette we really do want to use integers.
(current-bitwidth #f)
@cellularmitosis
cellularmitosis / README.md
Last active April 26, 2024 20:19
Tech Links
@nikitavoloboev
nikitavoloboev / inoreader.xml
Last active December 18, 2022 16:17
Inoreader RSS subscriptions exported. Can be imported into RSS feed reader of your choice. https://wiki.nikitavoloboev.xyz/research/blogs
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Subscriptions of nikita.voloboev from Inoreader [https://www.inoreader.com]</title>
</head>
<body>
<outline text="1." title="1.">
<outline text="langui.sh" title="langui.sh" type="rss" xmlUrl="https://langui.sh/feed.xml" htmlUrl="https://langui.sh/"/>
<outline text="Apple Machine Learning Journal" title="Apple Machine Learning Journal" type="rss" xmlUrl="https://machinelearning.apple.com/feed.xml" htmlUrl="https://machinelearning.apple.com/"/>
<outline text="knolleary" title="knolleary" type="rss" xmlUrl="https://knolleary.net/feed/" htmlUrl="https://knolleary.net/"/>