Skip to content

Instantly share code, notes, and snippets.

View jonohayon's full-sized avatar
🦊
שועל קוד

Jonathan Ohayon jonohayon

🦊
שועל קוד
  • Tel Aviv, Israel
View GitHub Profile
@jonohayon
jonohayon / data-json-explanation.md
Last active April 20, 2017 11:38
p5.js data.json fields explanation

data.json for syntax highlighting and autocomplete

Disclaimer

Warning - this is still very very WIP, so it's not complete yet.

Fields

  • modules
  • classes
  • classitems
@jonohayon
jonohayon / keybase.md
Created June 14, 2017 19:28
keybase.md

Keybase proof

I hereby claim:

  • I am jonohayon on github.
  • I am jonohayon (https://keybase.io/jonohayon) on keybase.
  • I have a public key whose fingerprint is 9C85 E6CA C210 7358 8D7C 2A09 574C 7929 553D 3955

To claim this, I am signing this object:

@jonohayon
jonohayon / charts.py
Created March 17, 2018 11:47
Barak's Charts
import os
import re
import csv
import sys
from collections import defaultdict
import matplotlib.pyplot as plt
from math import ceil
MATCH_REGEX = re.compile('(?P<type>PM|QM|QF|SF|F)[ -]?(?P<num>[0-9]+)')a
@jonohayon
jonohayon / points.txt
Created August 29, 2018 13:44
Points
Notes:
- sin, cos: [-180, 180] -> [-1, 1] === sin, cos are using angles (just for simplicity of writing, the software is using radians).
- All of the acceleration vectors are prependicular to the velocity vectors.
p_0: (0, 0)
v_0: (4.5cos(90), 4.5sin(90))
a_0: (-0.15sin(90), 0.15cos(90))
p_1: (1, 5)
v_1: (4.5cos(85), 4.5sin(85))
char *octalfive(unsigned int num) {
char *repr = (char *) malloc(BINARY_REPR_LEN * num);
unsigned int len;
sprintf(repr, "%05o", num);
len = strlen(repr);
memmove(repr, repr + (len - 5), 5);
return realloc(repr, 5);
}