- Wrapper for solana actions / solana pay
- Uses Hono (setup to be deployed to cloudflare)
npm install gist:c583db7577fc258570dfa2dbdb73be7e
/** | |
* Strongly typed event emitter | |
* | |
* @usage | |
* | |
* const emitter = createEmitter<{ | |
* signature: [{ publicKey: number[]; signature: number[] }]; | |
* }>(); | |
* | |
* emitter.on("signature", ({ publicKey, signature }) => { |
/** | |
* sort array (of objects) by multiple values | |
*/ | |
function sort (order) { | |
return function by (head, ...tail) { | |
return function comparator (a, b) { | |
if (!head) return 0; | |
if (a[head] > b[head]) return order; | |
if (a[head] < b[head]) return -order; |
const fs = require('fs'); | |
const hyperquest = require('hyperquest'); | |
const pump = require('pump'); | |
const xray = require('x-ray'); | |
const parse = require('json-parse-stream'); | |
const through = require('through2').obj; | |
const x = xray().throttle(1, 300); // be considerate | |
const schema = [{ |
/** | |
* Print SVG that will render a rectangular tooltip with a tip at the bottom | |
*/ | |
setTimeout(function() { | |
console.log( | |
'<svg version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="' + | |
getTooltipPath(10, 10, 200, 80, 4, 10, 2, 'top').toString() + | |
'" fill="#777777"/></svg>' | |
); |
for line in `docker ps | awk '{print $1}' | grep -v CONTAINER`; do docker ps | grep $line | awk '{printf $NF" "}' && echo $(( `cat /sys/fs/cgroup/memory/docker/$line*/memory.usage_in_bytes` / 1024 / 1024 ))MB ; done |
# USAGE: | |
# production node -e 'console.log(process.env.HELLO)' | |
# staging node -e 'console.log(process.env.HELLO)' | |
# | |
production() { | |
NODE_ENV=production \ | |
HELLO=world \ | |
FOO=bar \ | |
$* |
title | content | cover | createdAt | |
---|---|---|---|---|
Hello | World | -123- | 10-10-2012 |