Skip to content

Instantly share code, notes, and snippets.

View jmfd's full-sized avatar

Jonathan Deutsch jmfd

View GitHub Profile
@jmfd
jmfd / Uncompressed.js
Created October 17, 2023 19:14
Uncompressed image data for "Making CRDTs 98% More Efficient" post
{"0,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",3,[148,227,254]],"1,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",9,[148,227,254]],"2,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",12,[148,227,254]],"3,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",11,[148,227,254]],"4,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",15,[148,227,254]],"5,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",25,[148,227,254]],"6,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",21,[148,227,254]],"7,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",13,[148,227,254]],"8,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",5,[148,227,254]],"9,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",6,[148,227,254]],"10,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",7,[148,227,254]],"11,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",9,[148,227,254]],"12,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",11,[148,227,254]],"13,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",17,[148,227,254]],"14,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",19,[148,227,254]],"15,0":["7238b2dc-772a-4cf9-b118-f62013af8dca",19,[148,227,254]]
@jmfd
jmfd / gist:c2ab15babaf07315bc03
Last active August 29, 2015 14:13
Startup Napkin Math
Napkin math for software startup costs for a solo founder.
tl;dr = 8-20 months to save up enough money to do a startup after college. Or just do one when you're 18.
========
Assumes NO financial help in the startup (aside from cheap path by living with parents), NO network, NO investors.
Also assumes NO debt and some amount of property like furniture/kitchen supplies. (see below for details on college life)
Also assumes got a CS degree or equivalent and competent enough to get and hold an average job immediately after college.
Also assumes this job would just pay base salary; no bonuses or stock. (and no interest on money in the bank)
@jmfd
jmfd / gist:ad6f88486774bb97f8e3
Created December 21, 2014 20:21
(Working Manual Memory Management Version) Weak references are zeroed before dealloc, KVO won't deregister a keypath if the keypath results in a null object
//
// AppDelegate.m
// deleteme
//
// Created by Jonathan M Deutsch on 12/21/14.
// Copyright (c) 2014 Jonathan M Deutsch. All rights reserved.
//
#import "AppDelegate.h"
@jmfd
jmfd / gist:5ee36101ee2b088b434b
Created December 21, 2014 19:07
Weak references are zeroed before dealloc, KVO won't deregister a keypath if the keypath results in a null object
//
// AppDelegate.m
// deleteme
//
// Created by Jonathan M Deutsch on 12/21/14.
// Copyright (c) 2014 Jonathan M Deutsch. All rights reserved.
//
#import "AppDelegate.h"
diff --git a/MovingBoxes.html b/MovingBoxes.html
index 54ceae7..bc2da34 100644
--- a/MovingBoxes.html
+++ b/MovingBoxes.html
@@ -201,11 +201,7 @@ function setElementPosition(element, xPos, yPos) {
element.style.left = "" + xPos + "px";
element.style.top = "" + yPos + "px";
} else if(gTestProperty == "translate") {
- if(gShouldForce3D == true) {
- element.style[kTransformName] = "translateX(" + xPos + "px) translateY(" + yPos + "px) rotateY(0deg)";