This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
':' //; exec "$(command -v nodejs || command -v node)" "$0" "$@" | |
const path = require('node:path'); | |
//console.log(__dirname); | |
//console.log(path.dirname(__filename)); | |
const { access, constants } = require('node:fs') | |
const { exec } = require('child_process'); | |
exec('which node', (error, stdout, stderr) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Cargo.toml | |
//[package] | |
//name = "async-task" | |
//version = "0.1.0" | |
//edition = "2021" | |
// | |
//[dependencies] | |
//env_logger = "0.8.2" | |
//log = "0.4.13" | |
//tokio = { version = "1", features = ["full"] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Cargo.toml | |
//[package] | |
//name = "async-task" | |
//version = "0.1.0" | |
//edition = "2021" | |
// | |
//[dependencies] | |
//env_logger = "0.8.2" | |
//log = "0.4.13" | |
//tokio = { version = "1", features = ["full"] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use log::{info, trace}; | |
use std::collections::VecDeque; | |
use std::sync::{mpsc, Arc, Mutex}; | |
use std::time::Duration; | |
use tokio; | |
/// Create a WorkQueue of any type that holds all the work to be done | |
#[derive(Clone)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use log::{info, trace}; | |
use std::collections::VecDeque; | |
use std::sync::{mpsc, Arc, Mutex}; | |
use std::time::Duration; | |
use tokio; | |
/// Create a WorkQueue of any type that holds all the work to be done | |
#[derive(Clone)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use log::{info, trace}; | |
use std::collections::VecDeque; | |
use std::sync::{mpsc, Arc, Mutex}; | |
use std::time::Duration; | |
use tokio; | |
/// Create a WorkQueue of any type that holds all the work to be done | |
#[derive(Clone)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hypercore = require('hypercore') | |
var ram = require('random-access-memory') | |
var feed = hypercore(ram) | |
feed.append('hello world') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
##=============================================================================== | |
##make cargo-* | |
cargo-help:### cargo-help | |
@awk 'BEGIN {FS = ":.*?###"} /^[a-zA-Z_-]+:.*?###/ {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | |
cargo-release-all:### cargo-release-all | |
## cargo-release-all recursively cargo build --release | |
for t in */Cargo.toml; do echo $$t; cargo b -r -vv --manifest-path $$t; done | |
for t in ffi/*/Cargo.toml; do echo $$t; cargo b -r -vv --manifest-path $$t; done | |
cargo-clean-all:### cargo-clean-all - clean release artifacts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uacomment=plebnet.fun | |
signet=1 | |
signetchallenge=512102ee856c56a5aaadd1656f849bafa4c9dacc86a2878fe546c6189185f842ae2c1851ae | |
[signet] | |
seednode=104.131.10.218:38333 | |
addnode=104.131.10.218:38333 | |
addnode=78.99.116.68:12346 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ifeq ($(project),) | |
PROJECT_NAME := $(notdir $(PWD)) | |
else | |
PROJECT_NAME := $(project) | |
endif | |
export PROJECT_NAME | |
VERSION :=$(shell cat version) | |
export VERSION | |
TIME :=$(shell date +%s) |