個人的なリンク集兼ブックマークです。
他の人にとって参考になったとしたら幸いですが、それは私が目的・意図するところではありません。
Nostrはオススメはしないです。今、安住の地があるのならそこを大切にしましょう。
(ただし冒険心を持った人には心躍る地となるでしょう)
This file contains 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
const relay = 'wss://relay-jp.nostr.wirednet.jp' | |
const authors = ['634bd19e5c87db216555c814bf88e66ace175805291a6be90b15ac3b2247da9b'] | |
function history (until = Math.floor(new Date() / 1000)) { | |
let socket | |
if (typeof (WebSocket) === 'undefined') { | |
const WebSocket = require('websocket').w3cwebsocket | |
socket = new WebSocket(relay) | |
} else { | |
socket = new WebSocket(relay) |
nocommentコンパチな偽劣化はてなブックマーク作れる気がしてきたのでアイデアをメモしておく。
nocommentとは任意のページに、そのページに言及しているNostr上の一連のノートを埋め込めるJavaScriptライブラリである。
https://github.com/fiatjaf/nocomment
このライブラリは内部でr-tagを利用し当該ノートを引っ張っている。 Nostrのプロトコル的に書くと、
{
"kinds": [1],
This file contains 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
/* | |
* ATOM Lite/MatrixをBLEキーボードにするサンプルプログラム | |
* | |
* 送信するキーを変更するにはSEND_KEYの値を変更してください。 | |
* | |
* コンパイルにはESP32 BLE Keyboard library(https://github.com/T-vK/ESP32-BLE-Keyboard)が必要です。 | |
* 事前にインストールしておいてください。 | |
*/ | |
#include <BleKeyboard.h> // https://github.com/T-vK/ESP32-BLE-Keyboard |
This file contains 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 std::str; | |
fn main() { | |
// -- FROM: vec of chars -- | |
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}']; | |
// to String | |
let string1: String = src1.iter().collect::<String>(); | |
// to str | |
let str1: &str = &src1.iter().collect::<String>(); | |
// to vec of byte |