This file contains 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
extern crate serde; | |
extern crate serde_yaml; | |
use serde::{Deserialize, Serialize}; | |
#[derive(Debug, Serialize, Deserialize, PartialEq)] | |
struct Config { | |
max_memory_pages: u32, | |
} |
This file contains 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
A WebSocket is a persistent connection between a client and server. | |
WebSockets provide a bidirectional, full-duplex communications channel | |
that operates over HTTP through a single TCP/IP socket connection. | |
Allows for bidirectional communication of a single tcp conn. | |
#!/usr/bin/python3 | |
def binarySearch(arr, x): | |
l = 0 |
This file contains 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 exec from 'k6/execution'; | |
export const options = { | |
scenarios: { | |
constant_request_rate: { | |
executor: 'constant-arrival-rate', | |
rate: 1000, | |
timeUnit: '1s', // 1000 iterations per second | |
duration: '120s', | |
preAllocatedVUs: 1500, // how large the initial pool of VUs would be |
This file contains 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
Introduction. A couple of minutes about what you’re most interested in and excited about at ava labs and crypto in general. | |
- Tell me about your previous most exciting task. | |
- Tell me about a tech project you’ve worked on in your spare time. | |
- Tell me about NodeJs event loop. | |
- Implement API to serve crypto prices in NodeJS. | |
───────────────────────────┐ | |
┌─>│ timers │ | |
│ └─────────────┬─────────────┘ |
This file contains 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
#!/bin/bash | |
# start server in another window | |
# avalanche-network-runner server \ | |
# --log-level debug \ | |
# --port=":8080" \ | |
# --grpc-gateway-port=":8081" | |
# tested with v1.8.6 | |
AVALANCHEGO_EXEC_PATH="" |
This file contains 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
func Test_NewAggregate(t *testing.T) { | |
assert := assert.New(t) | |
scenarios := []struct { | |
name string | |
errs []error | |
wantNil bool | |
}{ | |
{ | |
name: "no errors", | |
errs: nil, |
This file contains 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 http from 'k6/http'; | |
import { check } from 'k6'; | |
export const options = { | |
scenarios: { | |
constant_request_rate: { | |
executor: 'constant-arrival-rate', | |
rate: 10000, | |
timeUnit: '1s', // 10000 iterations per second, i.e. 10000 RPS | |
duration: '120s', |
This file contains 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 ws from 'k6/ws'; | |
import { check } from 'k6'; | |
export let options = { | |
stages: [ | |
{ duration: '2m', target: 500 }, | |
{ duration: '30s', target: 0 }, | |
{ duration: '2m', target: 500 }, | |
{ duration: '30s', target: 0 }, | |
], |
This file contains 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
TZ=UTC git --no-pager show \ | |
--quiet \ | |
--abbrev=12 \ | |
--date='format-local:%Y%m%d%H%M%S' \ | |
--format="%cd-%h" | |
GOPRIVATE=github.com/hexfusion/avalanchego-internal go mod tidy |
This file contains 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
#!/bin/bash | |
read -p "Number of etcd to remain: " ETCD_MEMBERS_KEEP | |
# scale down CVO and CEO | |
NODES=($(oc get node -l 'node-role.kubernetes.io/master=' -o 'jsonpath={.items[*].metadata.name}')) | |
REMAINING_ETCD_NODE=${NODES[-1]} |