Skip to content

Instantly share code, notes, and snippets.

@folex
folex / github_actions_rust_publish_branch.yml
Created December 31, 2020 07:44
Github Actions Publish a crate from a branch
name: "publish-branch"
on:
push:
branches-ignore:
- "master"
jobs:
npm-publish:
name: "Publish branch"
@folex
folex / gh_actions_multicrate.yml
Created January 6, 2021 19:28
Github Actions Publish Multi-crate project
name: "publish-release"
on:
push:
branches:
- "master"
- "release"
jobs:
npm-publish:
@folex
folex / fluence.yml
Last active June 18, 2021 12:10
docker-compose -f fluence.yml up -d || rm -f
# management secret key is NAB5rGwT4qOEB+6nLQawkTfCOV2eiFSjgQK8bfEdZXY=
services:
fluence-0: # /ip4/127.0.0.1/tcp/9990/ws/p2p/12D3KooWHBG9oaVx4i3vi6c1rSBUm7MLBmyGmmbHoZ23pmjDCnvK
command: -f ed25519 -k 29Apzfedhw2Jxh94Jj4rNSmavQ1TkNe8ALYRA7bMegobwp423aLrURxLk32WtXgXHDqoSz7GAT9fQfoMhVd1e5Ww -m 12D3KooWFRgVmb1uWcmCbmJqLr8tBQghL6ysSpK2VyE2VZbaQ6wy -t 7770 -w 9990 --bootstraps /dns4/fluence-1/tcp/7771 /dns4/fluence-2/tcp/7772
container_name: fluence-0
environment:
RUST_BACKTRACE: full
RUST_LOG: info,network=trace,aquamarine=info,aquamarine::actor=info,tokio_threadpool=info,tokio_reactor=info,mio=info,tokio_io=info,soketto=info,yamux=info,multistream_select=info,libp2p_secio=info,libp2p_websocket::framed=info,libp2p_ping=info,libp2p_core::upgrade::apply=info,libp2p_kad::kbucket=info,cranelift_codegen=info,wasmer_wasi=info,async_io=info,polling=info,wasmer_interface_types_fl=info,cranelift_codegen=info,wasmer_wasi=info,async_io=info,polling=info,wasmer_interface_types_fl=info,particle_serv
@folex
folex / Cargo.toml
Created July 1, 2021 16:37
Use Fluence from Rust with ConnectedClient crate
[package]
name = "concl"
version = "0.1.0"
edition = "2018"
[dependencies]
connected-client = { git = "https://github.com/fluencelabs/fluence" }
eyre = "0.6.5"
maplit = "1.0.2"
serde_json = "1.0.64"
@folex
folex / retrieve_records.aqua
Created July 14, 2021 11:48
Aqua DHT record retrieval bug
import "dht.aqua"
import "@fluencelabs/aqua-lib/builtin.aqua"
service RecordOp("op"):
identity(records: []Record) -> []Record
func get_result(values_result: GetValuesResult) -> []Record:
records <- RecordOp.identity(values_result.result)
<- records
@folex
folex / fluence_animation.py
Last active October 7, 2022 13:32
Fluence Network Animation written in Manim
from manim import *
from math import sqrt
import random
import networkx as nx
nxgraph = nx.erdos_renyi_graph(11, 0.003)
# nxgraph = nx.gnp_random_graph(50, 0.2)
# nxgraph = nx.barabasi_albert_graph(50, 1)
# nxgraph = nx.random_lobster(150, 0.1, 0.1)