Skip to content

Instantly share code, notes, and snippets.

View rBurgett's full-sized avatar

Ryan rBurgett

View GitHub Profile
@rBurgett
rBurgett / mp_proposal.md
Last active August 1, 2020 16:02
MP Proposal

Project Pieces

  • Desktop Application - This where you will enter data. You will be able to add new episodes, blog posts, or modify site data (text, images, etc.). This will include all necessary data for generating your website, and can be used as a backup for the site itself along with having an option to export the data for separate backup as well. This same data could then be imported into the application (for example, if you move to a new computer).
  • Static site - This is a static site which is generated completely from the data entered in the desktop application. This will be the main show site. As a static site (meaning, unchanging files served as-is without having to generate dynamic files based on data from a database like WordPress), it will be able to be served extremely cheaply through a CDN. Since the entire site will be on a CDN, it will be able to handle an unlimited amount of traffic and never risk going down. It will also include a page where users can log in to post links. Eve
@rBurgett
rBurgett / db.js
Created August 17, 2020 20:51
Indexed db module
import Dexie from 'dexie';
import * as uuid from 'uuid';
const { TableNames } = Constants;
class DBTable {
_name = '';
_db = null;
_table = null;
@rBurgett
rBurgett / nginx_site_config
Last active August 22, 2020 16:43
Sample NGINX site config for reverse proxy w/ forced TLS using Let's Encrypt certs
server {
# Port 80 is the default port for accepting HTTP connections
listen 80;
# These are the domain names (including subdomains) which this configuration will accept connections for
server_name mydomain.com;
# This line is for permanently redirecting to SSL/TLS
return 301 https://mydomain.com$request_uri;
}
@rBurgett
rBurgett / js_cheat_sheet.md
Last active June 15, 2021 00:56
Riley Joy JS Cheat Sheet

Variables

// To make a variable that can be changed
let myVariable = 'something';

// To make a variable that does not change
const myConst = 'something else';

Strings

@rBurgett
rBurgett / xlite_macos_publish_build_process.md
Created December 6, 2021 21:59
XLite macOS Publish Native Build Procedure
  1. Install git.
  2. Install Node.js v14.
  3. Change npm's default global directory in order to avoid having to run global installs with sudo.
  4. Install Docker.
  5. Clone the repo: git clone https://github.com/blocknetdx/xlite.git
  6. Open the directory: cd xlite
  7. Checkout the appropriate branch e.g. git checkout dev.
  8. Install dependencies: npm install
  9. Run build script: npm run build
  10. Set GH_TOKEN environment variable to a GitHub Token with appropriate permissions for creating releases and pushing release builds.
@rBurgett
rBurgett / script-running.md
Created February 4, 2022 18:47
Running Regular Scripts Easily in Ubuntu

Ubuntu makes it very easy to record scripts into files that can be run anywhere from the command line, allowing you to script out common tasks and easily run them without always having to copy/paste or remember long, very technical commands.

Ubuntu will automatically look to see if there is a ~/.local/bin folder and will allow any script file in there to be run as a command.

For example, you might enter sudo mount /dev/nvme0n1p1 /media/8tb to mount an external drive. You can easily script that to run as a command.

First, check inside the .local folder:

ls ~/.local
@rBurgett
rBurgett / configure-node-pilot.sh
Created July 20, 2022 23:22
Example script for configuring node pilot via command line arguments
#!/bin/bash
set -e
EMAIL="my@emailaddress.com"
PASSWORD="mypassword"
DOMAIN="mysubdomain.mydomain.com"
echo "-> Start Node Pilot"
@rBurgett
rBurgett / node_pilot_api_docs.md
Last active December 6, 2022 20:39
Node Pilot JSON-RPC Documentation

Node Pilot JSON-RPC Server Overview

The Node Pilot JSON-RPC server provides API access to every single Node Pilot operation, from initial registration to creating, staking, and updating nodes.

The RPC server is available both via HTTP and via the command line using the Node Pilot CLI.

Accessing the JSON-RPC server via HTTP

The server can be accessed via port 34417 on the host machine at path /v1 e.g. http://localhost:34417/v1. It follows the JSON-RPC 2.0 Specification. All requests must be POST requests sent with a Content-Type of application/json. The payload must be in the following form:

@rBurgett
rBurgett / np_0.16.0_release_notes.md
Created September 20, 2022 23:52
Node Pilot 0.16.0 Release Notes

Features

  • Ethereum 2.0 support
  • Pocket BETA-0.9.x support
  • Ethereum Goerli testnet support
  • Pocket nodes are now served via Node Launcher which allows for one-click updating like other Node Pilot supported chains
  • All Node Pilot functionality is exposed via a JSON-RPC server at port 34417 (temporary documentation can be found here: https://gist.github.com/rBurgett/22605a4880e6f6e1cda15e426d02b299)
  • All key passwords are now encrypted
  • Nodes now automatically restart if they unexpectedly shut down
  • You can shut down Node Pilot while leaving your nodes running
@rBurgett
rBurgett / cc-gateway-providers.md
Last active January 23, 2023 20:01
Community Chains Gateway Providers

Provider Story:

  • Provider contacts us and gives us
    • email address
    • pokt address
    • for each gateway
      • public IP address of gateway server
      • each supported chain ID and accompanying local endpoint e.g. http://10.10.0.1:9500.
      • SSH login (w/ sudo privileges) via port 39889
      • Direct public ports from 39880-39888 to the gateway server
  • We create a provider account for them which includes