Skip to content

Instantly share code, notes, and snippets.

View timothyylim's full-sized avatar
🇳🇴
Loading...

Timothy Lim timothyylim

🇳🇴
Loading...
View GitHub Profile
const fs = require('fs')
let axios = require('axios')
const https = require('https')
const macaroon = fs.readFileSync('./admin.macaroon').toString('hex')
const myNode = axios.create({
baseURL: '', // Your endpoint here
httpsAgent: new https.Agent({
import lightning_pb2 as ln
import lightning_pb2_grpc as lnrpc
import codecs
import grpc
import os
# Due to updated ECDSA generated tls.cert we need to let gprc know that
# we need to use that cipher suite otherwise there will be a handhsake
# error when we communicate with the lnd rpc server.
os.environ["GRPC_SSL_CIPHER_SUITES"] = 'HIGH+ECDSA'
  • issue: Translations only work after refresh at the correct url
  • cause: window.WP (which specifies the correct urls for language files) is only fetched after refresh

How do we reset the window.WP object before a new view is rendered?

Files to look into:

  1. routes.js
  2. Home.js - where it gets data from the api
  3. api.js

Small tasks to do to understand how the crypto backend works.

  1. Set up developer account on blockcypher
  2. Download crypto-server repo and install all modules https://github.com/timothyylim/crypto-server
  3. rename .env-sample to .env and add your own developer token from blockcypher

Try the following

  1. Create a wallet (read and understand setup.js, run setup.js by node setup.js)
  2. Derive an address

My cheatsheet

vscode

Fold All: CTRL+K, CTRL+0 (zero)

Fold Level [n]: CTRL+K, CTRL+[n]*

Unfold All: CTRL+K, CTRL+J
echo $XP_HOME
export XP_HOME=/path/to/home/directory
./gradlew deploy -t 

Setting up a new mac for development

So that I can remember what I've done.

Applications:

  • VSCode
    • vim mode
    • settings.json => vim.foldfix = true
  • iTerm2
  • silence bell

Hub

Hub title and subtitle

Image pairing

Create an image pairing task

Hub Details view