Skip to content

Instantly share code, notes, and snippets.

View pi0neerpat's full-sized avatar
🤠

Patrick Gallagher pi0neerpat

🤠
View GitHub Profile
did:key:z6MkkM4bPvWXdxFLfjcrV9ybK5YPBi74Fx8vhcG3akq8G7QK
did:key:z6MkjTceGucPKPaLvKSSJQZJhgMuZWtnHTvwHG5cvyZdLbHw
@pi0neerpat
pi0neerpat / verdaccio.md
Created August 19, 2020 18:51
How to self host Verdaccio

Private Package Repositories

  • npm.org Private Packages link
  • Options for self-hosting private package repos link

Verdaccio

About Verdaccio link

Useful Commands

@pi0neerpat
pi0neerpat / docker-compose.yaml
Created August 18, 2020 16:34
verdaccio docker-compose
version: '3.1'
services:
verdaccio:
restart: unless-stopped
image: verdaccio/verdaccio
container_name: "verdaccio"
networks:
- node-network
@pi0neerpat
pi0neerpat / verdaccio install.md
Last active August 18, 2020 16:32
verdaccio install

Verdaccio

Learn about Private Packages here link

link

Commands

yarn config set registry http://localhost:4873
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
const COMPOUND_RATE_API =
'https://api.compound.finance/api/v2/ctoken?addresses[]=0x5d3a536e4d6dbd6114cc1ead35777bab948e3643';
export const getCompoundRate = async () => {
try {
const res = await axios.get(COMPOUND_RATE_API);
const rate = res.data.cToken[0].supply_rate.value;
return { rate, formattedRate: Math.round(rate * 10000) / 100 };
} catch (error) {
@pi0neerpat
pi0neerpat / loadwallet.js
Created March 26, 2020 15:48
load wallet
async loadContracts({
walletProvider,
contractNames,
allowancesRequested,
balancesRequested,
}) {
console.log("lol")
try {
ethers.errors.setLogLevel("error") // "debug", "default", "info", "warn", "off"