Skip to content

Instantly share code, notes, and snippets.

View melvincarvalho's full-sized avatar
💭
I may be slow to respond.

Melvin Carvalho melvincarvalho

💭
I may be slow to respond.
View GitHub Profile

NIP-17

Git Commits and Discovery Over Nostr

draft optional author:melvincarvalho

  • Reserves: kind 17
@melvincarvalho
melvincarvalho / czech answers
Last active September 13, 2022 12:29
czech answers
Mezinárodní den žen.
Advent.
Na Velikonoce.
Den boje za svobodu a demokracii.
K Velikonocům.
Na podzim.
V září.
24. prosince.
Ježíšek.
Tři králové.
file: bad-stamp.txt.ots
File sha256 hash: 7e3717bbe020f53cdc6c40154a1a8e55bddc13a28c8bb3c82e9ee64b81b44872
Timestamp:
ripemd160
prepend 0100000001e482f9d32ecc3ba657b69d898010857b54457a90497982ff56f97c4ec58e6f98010000006b483045022
100b253add1d1cf90844338a475a04ff13fc9e7bd242b07762dea07f5608b2de367022000b268ca9c3342b3769cdd06289131
7cdcef87aac310b6855e9d93898ebbe8ec0121020d8e4d107d2b339b0050efdd4b4a09245aa056048f125396374ea6a2ab070
9c6ffffffff026533e605000000001976a9140bf057d40fbba6744862515f5b55a2310de5772f88aca0860100000000001976
a914
append 88ac00000000
[
"076161ca22da5a2ab8c74465cbf08f79f3e7e8bb31f4dc211bd94319ebade03d",
"5a462fa6044b4b8da318528a6987a45e3adf832bd1c64bd6910eacfecdf07541",
"1bbb8324577ac089607e45813bac499ebdab4621d029f8c02b2c82b4410fd3f4",
"e9e4276490374a0daf7759fd5f475deff6ffb9b0fc5fa98c902b5f4b2fe3bba2",
"887645fef0ce0c3c1218d2f5d8e6132a19304cdc57cd20281d082f38cfea0072",
"ce5061bfcc16476b9bde3f1d5b3ec7730c4361cf8c827fbd9c14eb8c7003a1de",
"22e804d26ed16b68db5259e78449e96dab5d464c8f470bda3eb1a70467f2c793",
"ff24202025283c90d05337559b8ad7e3e0b811726d1cbb400a9b698cd7a01780",
"b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9",
<script src="https://cdn.jsdelivr.net/npm/webtorrent-element@latest/dist/webtorrent-element.min.js"></script>
<web-torrent
src="magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent"
file="Sintel.mp4" />
@melvincarvalho
melvincarvalho / update-hook.js
Created August 9, 2019 12:35
update react hook
const [seconds, setSeconds] = React.useState(0)
React.useEffect(() => {
const interval = setInterval(() => {
setSeconds(seconds => seconds + 1)
}, 3000)
return () => clearInterval(interval)
}, [])
@melvincarvalho
melvincarvalho / add bookmark
Created July 30, 2019 12:18
add bookmark
const user = 'https://melvincarvalho.com/#me';
const time = new Date().toISOString();
const title = document.title;
const recalls = location.href;
const ms = Math.floor(Math.random() * 1000);
const uri = time.substring(0,4) + time.substring(5,7) + time.substring(8,10) + time.substring(11,13) + time.substring(14,16) + time.substring (17,19) + "." + ms;
console.log(`
<> <http://purl.org/dc/terms/references> <#${uri}> .\n
\n
<#${uri}>\n
@melvincarvalho
melvincarvalho / solid-live-server.js
Created July 25, 2019 13:08
solid-live-server.js
#!/usr/bin/env node
const WebSocket = require('ws')
const WebSocketServer = require('ws').Server
const fs = require('fs')
const uuid = require('uuid')
const handler = require('serve-handler');
const https = require('https');
const INotifyWait = require('inotifywait')
const parallel = require('run-parallel')
@melvincarvalho
melvincarvalho / fixsolidterms.sh
Last active December 3, 2018 12:56
Fix https in solid terms
#!/usr/bin/env bash
# for i in `find $(pwd) -name publicTypeIndex.ttl` ; do bin/fixsolidterms.sh "$i" ; done
FILE=$1
TMPFILE=/tmp/solidterms.ttl
sed 's/https:\/\/www.w3.org\/ns\/solid\/terms#/http:\/\/www.w3.org\/ns\/solid\/terms#/g' $FILE > $TMPFILE
touch -r $TMPFILE $FILE
mv $TMPFILE $FILE
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello Solid World</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
</head>