Skip to content

Instantly share code, notes, and snippets.

@NoamDev
NoamDev / tbl.typ
Created November 15, 2024 06:49
typst 2d array table
#let tbl(arr) = {
let rows = arr.len()
let cols = calc.max(..for row in arr {(row.len(),)})
return table(
rows: rows,
columns: cols,
..for row in arr {
row += ([],) * (cols - row.len())
row
@NoamDev
NoamDev / tps.py
Last active September 9, 2021 16:44
Rust Net TPS
import requests
def get_last_tx_now():
headers = {
'Accept-Encoding': 'gzip, deflate, br',
'Content-Type': 'application/json',
'Accept': 'application/json',
'Connection': 'keep-alive',
'DNT': '1',
'Origin': 'https://rustnet1.ton.dev',