Skip to content

Instantly share code, notes, and snippets.

View okjodom's full-sized avatar
:octocat:
octocatin

okjodom

:octocat:
octocatin
View GitHub Profile
# Best used if called by 'tls-download-mutinynet.sh' script
# fedimint.my-super-host.com should be replaced by a domain controlled by you and all DNS below should redirect to the IP of your server.
# Domains:
# - fedimint.my-super-host.com
# - gatewayd.fedimint.my-super-host.com
# - gateway-ui.fedimint.my-super-host.com
# - rtl.fedimint.my-super-host.com
version: "3.3"
#!/bin/bash
# This file downloads the mutinynet docker-compose files for the LN gateway and fedimintd
# Important: This version uses TLS certificates, so you must have a domain under your control that you can change the DNS records for
# You can download this script and run it with: curl -sSL https://raw.githubusercontent.com/fedimint/fedimint/master/docker/tls-download-mutinynet.sh | bash
DOCKER_COMPOSE_FILE=https://gist.githubusercontent.com/okjodom/f8f8868ace900b7de305f0f44d4f8336/raw/175e787d584727d72e6b077f638a0f1c1f6b46b7/mutinynet-gateway-docker-compose.yml
if ! [ -x "$(command -v docker-compose)" ]; then
# check if we are running as root
Attaching to root_fedimintd_1
fedimintd_1 | Starting fedimintd
fedimintd_1 | 2023-07-24T18:08:01.938639Z  INFO consensus: Starting config gen
fedimintd_1 | 2023-07-24T18:08:01.939149Z  INFO net::api: Starting api on ws://0.0.0.0:80
fedimintd_1 | 2023-07-24T18:09:35.592101Z  INFO connection{remote_addr=172.19.0.2:39834 conn_id=0}: jsonrpsee_server::server: Accepting new connection 1/10
fedimintd_1 | 2023-07-24T18:10:45.116827Z  INFO connection{remote_addr=172.19.0.2:45408 conn_id=1}: jsonrpsee_server::server: Accepting new connection 1/10
fedimintd_1 | 2023-07-24T18:11:12.268470Z  INFO connection{remote_addr
use std::net::SocketAddr;
use anyhow::anyhow;
use clap::Parser;
use fedimint_core::task::TaskGroup;
use ln_gateway::gatewaylnrpc::gateway_lightning_server::{
GatewayLightning, GatewayLightningServer,
};
use ln_gateway::gatewaylnrpc::{
EmptyRequest, GetNodeInfoResponse, GetRouteHintsResponse, PayInvoiceRequest,
@okjodom
okjodom / aboutfedimint.md
Last active May 26, 2023 02:25
About Fedimint

What is Fedimint:

  • Bitcoin custody protocol. Here is a primer
  • most applicable in a community context

Personas in Fedimint

  • The guardians (aka. custodians, aka. federation members)
    • technical community members
    • runs a federation which holds funds on behalf of the community
    • jointly manage an onchain bitcoin wallet (threshold multisig)
  • coordinate through distributed consensus
@okjodom
okjodom / colighter.md
Created March 24, 2023 13:48
Colighter video sample
Screencast.from.2023-03-24.04.42.26.PM.webm
@okjodom
okjodom / causeway.js
Last active November 16, 2021 19:27
Google earth engine water quality analysis, Mbita point study area
/*
Water Quality Analysis in the Winam Gulf of Lake Victoria
Water Quality Parameter: Chlorophyll-a
#####################
Specific Study Area: Mbita Point
Datasets: Landat 5 and Landsat 7 Satellite Imagery
Epochs: December 31st of the years [1984, 1988, 1992, 1996, 2000, 2004, 2008, 2016, 2016]
Test Epochs: 1984 and 2016 (Sentinel Epochs)
@okjodom
okjodom / _bookpropclass.js
Created May 14, 2018 09:34
React JS book prop using ES6 classes
import React from 'react'; // super class
class Book extends React.Component{ // sub class extends super class
constructor (){ // all classes have a constructor method
super(props); // must do this to link sub class to super class properties
this.id = "#B00K123";
this.title = "We All Don't Know JS";
this.description = "The book everyone needs to read";
this.price = 0;
/* Because everybody loves a blue Subaru */
// Normal parameter defaults
function favoriteCar(car = 'Subaru', color = 'blue') {
return `Everybody loves a ${color} ${car}!`;
}
console.log(favoriteCar()); // Everyody loves a blue Subaru!
// Parameter defaults with object destructuring
function favoriteCar({car = 'Subaru', color = 'blue'} = {}) {
@okjodom
okjodom / _pirates.js
Last active May 14, 2018 07:48
Javascript Loop family
/* Three for loops in JavaScript */
const pirates = ['Davy Jones', 'Blackbeard', 'Cap`n Barbossa', 'Hook', 'Long Jon Silver', 'Jack Sparrow'];
// classical for loop
for (let i = 0; i < pirates.length; i++) {
console.log(`Yarrr! Ye can call me ${pirates[i]}`);
}
// for-in loop