Skip to content

Instantly share code, notes, and snippets.

@mfornos
mfornos / polkadot_p2p_authorities.md
Last active February 19, 2024 08:40
Polkadot P2P Authority Discovery
@mfornos
mfornos / contract-lang-detect.py
Last active October 17, 2022 15:47
Heuristics on Substrate contracts pallet source language detection
import sys
from ppci import wasm
m = wasm.Module(sys.stdin.buffer.read())
sections = m.get_definitions_per_section()
imports = sections['import']
start = sections['start']
customs = sections['custom']
mem = next(filter(lambda x : x.kind == 'memory', imports))

Keybase proof

I hereby claim:

  • I am mfornos on github.
  • I am mfornos (https://keybase.io/mfornos) on keybase.
  • I have a public key whose fingerprint is 20C1 5EF8 5B76 4479 F19F C72A 91CB 62F7 1760 95A8

To claim this, I am signing this object:

/*
-----------------------------------
Emoji - natural display for the web
-----------------------------------
These font face definitions allows to display emoji glyphs intermingled with
arbitrary characters outside emoji unicode blocks.
Usage
@mfornos
mfornos / ryb.less
Last active August 29, 2015 13:57
RYB Color Model LESS Mixins
/*
----------------------
RYB Color Model Mixins
----------------------
RYB is an artistic color model that provides somewhat better color harmonies
(complementary, triadic &c), although not mathematically perfect since
cannot cover the whole visible spectrum. Neither good for physical pigments encoding.
http://en.wikipedia.org/wiki/RYB_color_model