Skip to content

Instantly share code, notes, and snippets.

Avatar

Doctor I·T DrI-T

View GitHub Profile
@DrI-T
DrI-T / DHkeys.pl
Last active Mar 10, 2022
GitChain: a eco-organic git based blockchain
View DHkeys.pl
#!/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 Feb 22, 2022
BKU: starting the Knowledge Economy
View README.md

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

View README.md

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 Feb 6, 2022
using GIT add a blockchain
View README.md

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 Jan 18, 2022
npm install conflict (SOLVED)
View INSTALL.md
# 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 Dec 19, 2021
nf-req-id.txt
View nftime.pl
#!/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 Sep 20, 2021
birth time
View birth.c
#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 Jul 11, 2021
hashcash (original)
View README.md

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 !
View getobjecthash.sh
#
# ----------------------------------------------------------
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 Jul 5, 2021
The mother of all code
View 1stcommit.sh
#
# 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