Skip to content

Instantly share code, notes, and snippets.

View telamon's full-sized avatar
🙂
probing for lost signals

Tony Ivanov telamon

🙂
probing for lost signals
View GitHub Profile
const { Readable } = require('streamx')
const UDX = require('.')
const runtime = (globalThis.Bare || process)
async function udxStreamPair () {
const udx1 = new UDX()
const udx2 = new UDX()
const socket1 = udx1.createSocket()
drm_info
```
$ drm_info | grep -i gamma
│ │ │ └───Gamma size: 1024
│ │ ├───"DEGAMMA_LUT": blob = 0
│ │ ├───"DEGAMMA_LUT_SIZE" (immutable): range [0, UINT32_MAX] = 1024
│ │ ├───"GAMMA_LUT": blob = 120
│ │ └───"GAMMA_LUT_SIZE" (immutable): range [0, UINT32_MAX] = 1024
│ │ │ └───Gamma size: 1024
│ │ ├───"DEGAMMA_LUT": blob = 0
# API Design
PUT /$/bee/index
^ ^ ^^^^^ <-- hyperbee namespace
| |---- hyperbee special-path
|---- SPECIAL META charactter for hyper-fetch.
[
{ OPERATION1 },
{ OPERATION2 },

For a custom encoding using URL fragment-safe characters, you can go beyond Base64.
Considering alphanumeric characters (A-Z, a-z, 0-9), which give you 62 characters,
and adding safe special characters like:

-_.~!$&'()*+,;=:@?/#[]

(which are 22 in total), you can potentially reach a base count of around 84 (62 + 22).

This would be a custom base-84 encoding, utilizing these URL-safe characters to maximize space efficiency.

@telamon
telamon / tensor_cheatsheet.md
Created October 5, 2023 22:13
beginner pytorch tensor-cheatsheet.

Pytorch Tensor Cheatsheet

1. Initialization

  • Scalar (0D tensor):
    x = torch.tensor(42)
    # Shape: []
@telamon
telamon / emojisearch.js
Created October 9, 2022 20:19
Emoji search-n-type picker
import { readFileSync } from 'node:fs'
import { pack, unpack } from 'msgpackr'
// Load tag->emo list
let a
try {
a = JSON.parse(readFileSync('./emojis.json'))
} catch (err) {
console.error(err.message)
console.log('do you have the input file?')
@telamon
telamon / sharescreen.sh
Last active September 13, 2024 15:10
Wayland screenshare script via wf-recorder and v4l2loopback
#!/bin/bash
# Preliminary steps (void linux):
# sudo xbps-install -Su v4l2loopback wf-recorder
# (don't forget to reboot if new Kernel version was upgraded)
#
# Too lazy to autodetect active monitor resolution
WIDTH=2560
HEIGHT=1440

Failing test:

test('encoding fault', t => {
  t.plan(2)
  const f1 = hypercore(ram)

  const dummyExt = {
    encoding: {
      encode: () => t.ok('encoder was invoked'), // encoder is not invoked.
      decode: () => t.ok('decode was invoked')
@telamon
telamon / README.md
Last active July 31, 2019 22:53
Replication proposal draft
@telamon
telamon / README.md
Last active November 29, 2018 12:14
Instant kibana

kibup (Kibana up)

Launches a local kibana instance that connects to an Elastic instance specified by url

Installation:

Download kibup script and make it executable chmod +x kibup

Usage: