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 / README.md
Last active March 28, 2021 08:00
CORS and local IPFS API gateway ...
@DrI-T
DrI-T / README.md
Last active March 29, 2021 09:37
IPFS Gateways PeerIDs
@DrI-T
DrI-T / _config.yml
Last active April 14, 2021 21:16
proof of location and time
sitename: stamped
netname: adoring-babbage-fef8c2
badgeid: 7c75d385-56ca-45af-825f-5c0f419aba9a
@DrI-T
DrI-T / README.md
Last active April 16, 2021 09:01
jarrod's boilerplate

Get a simple boiler-plate for your static website

This intention here is to get a minimal jekyll template that let you start for creating a new site, without the need of doing everything from scratch again and again.

usage:

mkdir mynewsite.io
@DrI-T
DrI-T / app.js
Last active April 22, 2021 08:53
Your location is ...
var cached;
get_loc()
.then( json => {
el = document.getElementsByTagName('div')[0];
el.innerHTML = el.innerHTML.replace(':location',`${json.city}, ${json.region}`)
el.innerHTML = el.innerHTML.replace(':ip',json.ip)
})
@DrI-T
DrI-T / index.html
Last active April 27, 2021 12:52
an (editable) one-page hostless static website
<!DOCTYPE html><meta charset="utf8">
<div id=container contenteditable oninput="update(event);">
<img id=logo src=https://ipfs.blockring™.ml/ipfs/QmVFJEec5cD9nCmzx9ic6rGJSe8hDzMWEchcoxnZtG1QK8/drit-pin-logo.svg>
<h3>I believe this page is super cool ...</h3>
<p>You can write anything you want on it,
hit the publish button, and you have a free online webpage to you to send a message across the world.
<p>
<i>Requirement you need to have an IPFS node running on your machine at
<a href="http://127.0.0.1:8080/ipfs/:qm/" contenteditable=false> 127.0.0.1:8080</a> /
<a href="#" data-href="http://127.0.0.1:5001/api/v0/config/show" onclick="post(this.dataset.href);"
@DrI-T
DrI-T / app.js
Last active April 27, 2021 19:08
public folder
// this code find the peers who stated "I share my MFS public folder" and display the public folder url
let el = null;
var ipns_cache = {};
var peers = [];
var peerid = 'QmcfHufAK9ErQ9ZKJF7YX68KntYYBJngkGDoVKcZEJyRve';
var api_url = 'http://127.0.0.1:5001/api/v0/';
var gw_url = 'https://ipfs.blocring™.ml';
var label = 'I share my MFS public folder.';
@DrI-T
DrI-T / README.md
Last active April 29, 2021 11:56
NFTs

Is my code Art ?

Art is unique, and so is NFTs !

This piece of [html code][1] is my unique expression of my love for humanity and the universe surrounding it.

I have great hope that the simple technology for sharing unique digital-art among us, we transform our societies for the better.

So in other words this is the NFT I am offering on the internet

@DrI-T
DrI-T / README.md
Last active May 8, 2021 05:38
SVG path access

Hello,

In [test-use][1], I am trying to access a path within an SVG that is instantiated with a <use> tag, I end-up with an empty list for the paths

test-use error: paths: NodeList []

Whereas in [test-path-data][2], I am successfully reading the path elements within an SVG objec However if I want to use getPathData() it doesn't work :

@DrI-T
DrI-T / README.md
Last active May 9, 2021 05:00
DH secret

# What's our secret ?

One can safely share a secret using DH key exchange :

 pubkey(self) = g ^ privkey mod prime
 
 secret = pubkey(otherparty) ^ privkey mod prime