Skip to content

Instantly share code, notes, and snippets.

View jimpick's full-sized avatar
💭
Hi!

Jim Pick jimpick

💭
Hi!
  • HexCamp
  • Victoria, BC, Canada
  • X @jimpick
View GitHub Profile
@jimpick
jimpick / 1000-containers-tcp-base-upload-k8s.txt
Created December 22, 2019 08:25
Results from 1000 container basic-tcp upload test on k8s
This file has been truncated, but you can view the full file.
{"runenv":{"test_plan":"basic-tcp","test_case":"upload","test_run":"23c34602-7515-41d6-abdc-b4918792dd23","test_seq":0,"test_instance_count":1001,"test_sidecar":true},"timestamp":1577002236192525469,"msg":"IP: 127.0.0.1"}
{"runenv":{"test_plan":"basic-tcp","test_case":"upload","test_run":"23c34602-7515-41d6-abdc-b4918792dd23","test_seq":0,"test_instance_count":1001,"test_sidecar":true},"timestamp":1577002236192769555,"msg":"IP: 100.96.4.36"}
{"runenv":{"test_plan":"basic-tcp","test_case":"upload","test_run":"23c34602-7515-41d6-abdc-b4918792dd23","test_seq":0,"test_instance_count":1001,"test_sidecar":true},"timestamp":1577002236293002516,"msg":"Sender: 100.96.4.36"}
{"runenv":{"test_plan":"basic-tcp","test_case":"upload","test_run":"23c34602-7515-41d6-abdc-b4918792dd23","test_seq":0,"test_instance_count":1001,"test_sidecar":true},"timestamp":1577002306688661466,"metric":{"name":"sent_bytes","unit":"bytes","improve_dir":-1,"value":1024000}}
{"runenv":{"test_plan":"basic-tcp","test_case":"upload","test_run":"23c
@jimpick
jimpick / demo2.aws_ec2.yml
Created October 26, 2019 18:52
Ansible + EC2 Tags
plugin: aws_ec2
regions:
- us-west-2
keyed_groups:
- key: tags.TG
prefix: tag_TG_
separator: ""
compose:
# set the ansible_host variable to connect with the private IP address without changing the hostname
ansible_host: private_ip_address
@jimpick
jimpick / filebeat.yml
Created October 14, 2019 16:49
Working filebeat.yml for testground
###################### Filebeat Configuration Example #########################
# This file is an example configuration file highlighting only the most common
# options. The filebeat.reference.yml file from the same directory contains all the
# supported options with more comments. You can use it as a reference.
#
# You can find the full configuration reference here:
# https://www.elastic.co/guide/en/beats/filebeat/index.html
# For more available modules and options, please see the filebeat.reference.yml sample
@jimpick
jimpick / README.md
Created July 24, 2019 02:48
Testlab + Vagrant + IPFS Demo
3Box is a social profiles network for web3. This post links my 3Box profile to my Github account!
✅ did:muport:QmYFb4EX1j3W8NYXyLuLBQPht5NaRx9dnBkAW11meScVrH ✅
Create your profile today to start building social connection and trust online. https://3box.io/
const util = require('util')
const spawn = require('child_process').spawn
const execFile = util.promisify(require('child_process').execFile)
const PQueue = require('p-queue')
const subset = require('./asks-subset.json')
const asks = subset.sort((a, b) => a.Price - b.Price)
async function run () {
let probeCid = await importFile('hello.txt')
@jimpick
jimpick / 1_summary.txt
Last active April 1, 2019 20:29
Filecoin Simple Probe Test - User Devnet 2019.03.29 v0.1.4
Attempted to store the contents of hello.txt ("Hi my name is Jim") on every miner with a current advertised ask, for a 24 hours duration.
Number of asks: 72
Proposals accepted: 15 of 72
Number of deals transitioned to 'posted' state: 9 of 15
Successful retrievals: 7 of 9
@jimpick
jimpick / probe-asks-subset.js
Created February 26, 2019 02:58
node.js program to propose small storage deal to multiple miners in parallel
const util = require('util')
const spawn = require('child_process').spawn
const execFile = util.promisify(require('child_process').execFile)
const PQueue = require('p-queue')
const subset = require('./asks-subset.json')
const asks = subset.sort((a, b) => a.Price - b.Price)
async function run () {
let probeCid = await importFile('hello.txt')
@jimpick
jimpick / output.txt
Last active February 25, 2019 21:38
Filecoin + zfec
Filecoin - Split pictures.tar.gz
================================
Sunday 9:00pm - 22070 + 2880 = 24950
> (env) jpimac:pictures-zfec-3-of-5 filecoin2$ ls -lh
total 294600
-rwxr-xr-x 1 filecoin2 staff 29M Feb 24 21:01 pictures.tar.gz.0_5.fec
-rwxr-xr-x 1 filecoin2 staff 29M Feb 24 21:01 pictures.tar.gz.1_5.fec
-rwxr-xr-x 1 filecoin2 staff 29M Feb 24 21:01 pictures.tar.gz.2_5.fec
#! /bin/bash
HEAD=`go-filecoin show block $(go-filecoin chain head | jq .[0]['"/"'] | tr -d \") | sed -n 's/Height: //p'`
go-filecoin client list-asks --enc=json | jq -C -s "map(select(.Expiry > $HEAD) | {Miner,ID, Price: .Price | tonumber, Expiry}) | sort_by(.Price) | reverse"