Hypertext in Emacs: find-file-at-point

tags: Emacs source: http://bjornwestergard.com/log/2022-04-19-hypertext-emacs.gmi C-x C-f M-n to find-file-at-point.

January 31, 2023 · 1 min · Gray King

Solana PDA

tags: Solana, Solana 101: 2. Anchor What is Program Derived Address(PDA)?1 A Program Derived Address is simply an account owned by the program, but has no private key. Instead it’s signature is obtained by a set of seeds and a bump (a nonce which makes sure it’s off curve). “Generating” a Program Address is different from “creating” it. Generating One can generate a PDA using Pubkey::find_program_address in Rust or PublicKey.findProgramAddressSync in JavaScript; Creating a PDA essentially means to initialize the address with space and set the state to it. #+end_quote ...

December 26, 2022 · 2 min · Gray King

Reverse Proxy to bypass Network Issue of Solana RPC Node

tags: Nginx One Endpoint for Both WebSocket and Normal Requests,Solana,Solana 101: Create an Escrow dApp I met a lot network issues about connecting to RPC node of Solana, so I’m using a nginx server as a reverse proxy to bypass this problem: location / { # https://serverfault.com/a/923254 try_files /nonexistent @$http_upgrade; } location @ { proxy_pass https://api.testnet.solana.com; proxy_read_timeout 300s; proxy_send_timeout 300s; proxy_set_header Host "api.testnet.solana.com"; } location @websocket { proxy_redirect off; proxy_pass https://api.testnet.solana.com; proxy_http_version 1.1; proxy_read_timeout 300s; proxy_send_timeout 300s; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; }

December 24, 2022 · 1 min · Gray King

Nginx

tags: Linux

December 24, 2022 · 1 min · Gray King

Nginx One Endpoint for Both WebSocket and Normal Requests

tags: Nginx source: https://serverfault.com/a/923254 server { # ... location / { # If "Websocket" is in Upgrade header, then @websocket will take effect, # otherwise @ will take effect. try_files /nonexistent @$http_upgrade; } location @websocket { # websocket related stuff } location @ { # web related stuff } }

December 24, 2022 · 1 min · Gray King