Skip to content

Instantly share code, notes, and snippets.

View DrI-T's full-sized avatar

Doctor I·T DrI-T

View GitHub Profile
@DrI-T
DrI-T / DHkeys.pl
Last active March 10, 2022 23:34
GitChain: a eco-organic git based blockchain
#!/usr/bin/perl
#BEGIN { if (-e $ENV{SITE}.'/lib') { use lib $ENV{SITE}.'/lib'; } }
# usage:
# ipfs key export -o /dev/stdout DPKI | perl DHkeys.pl $pku
# header: 08011240
# ipfs key list -l --ipns-base base16 | grep self
# pub-self: f01721220d4ca21fd67b197375c10392f392adc4cd33fbce4575d435e23a664f0cbac60f7
# ........ 1 2 3 4 5 6
@DrI-T
DrI-T / README.md
Last active February 22, 2022 20:12
BKU: starting the Knowledge Economy

brandmarks, knowledgemark and usemarks (BKU)


   *** Disclaimer this is a project in development ***

Not all features are readily available if you are a developper, a talented contributor, or a technology evengelist we will be delighted if you join us. if you want to fund the project to help its release, PLEASE do so

@DrI-T
DrI-T / README.md
Last active February 8, 2022 20:22
btcchain

Bitcoin chain hashes

A block chain is nothing more than a sequences of hashes ... here are the top ones as of Feb 8 21:00

@DrI-T
DrI-T / README.md
Last active February 6, 2022 15:30
using GIT add a blockchain

The git blockchain

GIT already "cryptographically chain commits the only thing we are missing is a secure timestamp to have a concensus among the participants.

Using ots will provide timestamp on the bitcoin chain (BTC)

We only need a way to discover the HEAD (i.e. longuest chain) git pull $(pick-random-node)

@DrI-T
DrI-T / INSTALL.md
Created January 18, 2022 16:56
npm install conflict (SOLVED)
# FRESH START !
unset NODE_ENV
sudo apt-get remove nodejs
sudo apt update
sudo apt autoremove
sudo apt upgrade
# problem with npm and node install
sudo apt-get install npm
apt-cache policy npm
@DrI-T
DrI-T / nftime.pl
Last active December 19, 2021 04:50
nf-req-id.txt
#!/usr/bin/perl
# curl -I https://app.netlify.app/
use YAML::XS qw(Dump);
my $resp = &head_url('http://clock.netlify.app/');
#printf "resp: %s\n",Dump($resp);
#printf "headers: %s\n",Dump($resp->headers);
my $rid = $resp->headers()->{'x-nf-request-id'};
@DrI-T
DrI-T / birth.c
Last active September 20, 2021 10:19
birth time
#define _GNU_SOURCE
#define _ATFILE_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include "statx.h"
#include <time.h>
#include <getopt.h>
@DrI-T
DrI-T / README.md
Last active July 11, 2021 16:56
hashcash (original)

README for hashcash

gpg --verify hashcash.tgz.sig 
gpg --search-keys=3E7BCAA828B24551
curl -s https://keyserver.ubuntu.com/pks/lookup?search=3E7BCAA828B24551&fingerprint=on&op=index
curl -s https://pgp.uni-mainz.de/pks/lookup?op=index&search=3E7BCAA828B24551
curl -S http://pgpkeys.eu:11371/pks/lookup?search=3E7BCAA828B24551&fingerprint=on&op=index
# not found !
@DrI-T
DrI-T / getobjecthash.sh
Last active July 6, 2021 20:14
SHA-loose
#
# ----------------------------------------------------------
locate -e .git/objects/ | isfile.pl | perl -ne 'print "$1$2\n" if m,/([0-9a-f]{2})/([0-9a-f]{38})$,' | perl -S uniq.pl | gzip -c > objects-0.lof.gz
find ~ -not -path "*/blocks*" -type d -path '*.git/objects' 2>/dev/null | tee -a gitdirs.lof
find /data -not -path "*/blocks*" -type d -path '*.git/objects' 2>/dev/null | tee -a gitdirs.lof
find /media/michelc/ -not -path "*/blocks*" -type d -path '*.git/objects' 2>/dev/null | tee -a gitdirs.lof
@DrI-T
DrI-T / 1stcommit.sh
Last active July 5, 2021 09:32
The mother of all code
#
# just after a ``git init`` you might want to do a
#
# sh 1stcommit.sh
# source GIT urls:
# - http://127.0.0.1:8080/ipfs/QmcpcVDXp31YsEBjZGieFF1abUTweuZk9EBxVWjKjx2qKp
# - http://127.0.0.1:8080/ipns/hologit.ml/anony/source.git
# - http://127.0.0.1:8080/ipfs/QmPwfV3f5PsfaPpRV6umWJzn8kjmneQY5ZAoKdBKqd8Yeu/8c8042a378f1db0ba13e0c8216590155.git