Skip to content

Instantly share code, notes, and snippets.

@rovast
rovast / nostr.ts
Last active March 9, 2023 07:17
nostr class with request response model
import { relayInit, getPublicKey, getEventHash, signEvent } from "nostr-tools";
import type { Relay, Event, Filter } from "nostr-tools";
type requestParams = {
m: string; // module
c: string; // controller
a: string; // action
content?: any; // params json
};
@rovast
rovast / datesWithWeeks.js
Last active June 24, 2021 23:29
handle dates group by weeks
const moment = require('./moment')
const events = [
{ time: '2021-06-24', data: {} },
{ time: '2021-06-24', data: {} },
{ time: '2021-06-25', data: {} },
{ time: '2021-06-26', data: {} },
{ time: '2021-06-27', data: {} },
{ time: '2021-06-28', data: {} },
{ time: '2021-06-29', data: {} },
@rovast
rovast / config.inc.php
Last active May 22, 2018 01:49
phpMyadmin Multi Server Configuration
<?php
$cfg['AllowArbitraryServer'] = true;
$cfg['MaxNavigationItems'] = 500;
/*
* First server
*/
//如果要管理,更多个mysql服务器,就修改$connect_hosts这个数组就行了
@rovast
rovast / readme.md
Last active April 16, 2018 13:42
My VSCode Settings