- Mainboard ASUS PRIME Z390-A Z390
- ASUS Dual-GTX1650-O4G
- Intel i9 9900
- 32GB Ram
- NEC Corporation uPD720200 USB 3.0 Host Controller
- Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 (1 TB)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "IPlugEffect.h" | |
#include "IPlug_include_in_plug_src.h" | |
#include "IControls.h" | |
#include "IWebViewControl.h" | |
#include "json.hpp" | |
using json = nlohmann::json; | |
IPlugEffect::IPlugEffect(const InstanceInfo& info) | |
: Plugin(info, MakeConfig(kNumParams, kNumPrograms)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use test::Bencher; | |
#[derive(Debug)] | |
pub struct Rate { | |
pub id: u8, | |
pub from: String, | |
pub to: String, | |
pub exchange: String, | |
pub rate: f64, | |
pub vol: f64, |
This will guide you through setting up a replica set in a docker environment using.
- Docker Compose
- MongoDB Replica Sets
- Mongoose
- Mongoose Transactions
Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import { Component, ComponentClass, createRef, forwardRef, Ref } from 'react'; | |
const myHoc = <ComposedComponentProps extends {}>( | |
ComposedComponent: ComponentClass<ComposedComponentProps>, | |
) => { | |
type ComposedComponentInstance = InstanceType<typeof ComposedComponent>; | |
type WrapperComponentProps = ComposedComponentProps & { | |
wrapperComponentProp: number; |
Blockchain reading notes
Rocket Pool
- https://docs.rocketpool.net/guides/staking/overview.html#how-eth2-staking-works
- deposit eth to rocket pool smart contracts
- Smart Node Network run rocket pool Smart Node software.
- Smart node communicates with protocol's smart contract and provide consensus required by Beacon Chain.
- need 16 eth to run Smart Node
- must put up RPL as collateral for insuring and bonding their node against bad behavior
- Minipool Validators are smart contracts created by operators who deposit 16 ETH on their node. This smart contract recieves 16ETH deposits from users who want to stake but not run nodes (rETH stakers). A new validator is creatd when this contract contains a t total of 32 ETH (16 ETH initial and 16 ETH from rETH stakers)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bp | |
import ( | |
"crypto/elliptic" | |
"crypto/rand" | |
"crypto/sha256" | |
"encoding/binary" | |
"math/big" | |
"fmt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const csvStringToArray = strData => | |
{ | |
const objPattern = new RegExp(("(\\,|\\r?\\n|\\r|^)(?:\"([^\"]*(?:\"\"[^\"]*)*)\"|([^\\,\\r\\n]*))"),"gi"); | |
let arrMatches = null, arrData = [[]]; | |
while (arrMatches = objPattern.exec(strData)){ | |
if (arrMatches[1].length && arrMatches[1] !== ",")arrData.push([]); | |
arrData[arrData.length - 1].push(arrMatches[2] ? | |
arrMatches[2].replace(new RegExp( "\"\"", "g" ), "\"") : | |
arrMatches[3]); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"runtime" | |
) | |
func userHomeDir() string { | |
if runtime.GOOS == "windows" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# kill process by name or port | |
# example: | |
# fkill someapp :8080 node :1111 | |
fkill() { | |
for i in $@;do export q=$i;if [[ $i == :* ]];then lsof -i$i|sed -n '1!p'; | |
else ps aux|grep -i $i|grep -v grep;fi|awk '{print $2}'|\ | |
xargs -I@ sh -c 'kill -9 @&&printf "X %s->%s\n" $q @';done | |
} |
NewerOlder