Skip to content

Instantly share code, notes, and snippets.

View msmyers's full-sized avatar

Michael Smyers msmyers

View GitHub Profile
{
"name": "avalanche",
"chainId": "43114",
"contracts": {
"BentoBoxV1": {
"address": "0x150c41c1B97C3cBb8deD321B10cC39Cc157BeDC6",
"abi": [
{
"inputs": [
{
❯ yarn avax:deploy
yarn run v1.22.18
$ hardhat --network avalanche deploy
Nothing to compile
Creating Typechain artifacts in directory types for target ethers-v5
Successfully generated Typechain artifacts!
0xf131e56DBD95f3fb1c57F7238bB1dcf84b501150
reusing "BentoBoxV1" at 0x150c41c1B97C3cBb8deD321B10cC39Cc157BeDC6
reusing "UniswapV2Factory" at 0x8fc1A2d4500B3538ac29Ca8176931a0C261ef1bF
reusing "UniswapV2Router02" at 0xBA751c09C47C407C2feeD4E10A6A5EE09cb01797
#!/bin/sh
# This script installs the Nix package manager on your system by
# downloading a binary distribution and running its installer script
# (which in turn creates and populates /nix).
{ # Prevent execution if this script was only partially downloaded
oops() {
echo "$0:" "$@" >&2
exit 1
By default, binaries installed by gem will be placed into:
/usr/local/lib/ruby/gems/3.1.0/bin
You may want to add this to your PATH.
ruby is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
If you need to have ruby first in your PATH, run:

Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups command.

  1. List the topics to which the group is subscribed
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe

Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.

  1. Reset the consumer offset for a topic (preview)
did:3:kjzl6cwe1jw146l06cexqabfzr2jr0je0flpjvwbygn8agf084yaphsfsjd8axy
@msmyers
msmyers / README.md
Created May 29, 2021 05:17 — forked from RichardBronosky/README.md
Using cloud-init for cloudless provisioning of Raspberry Pi

Installing cloud-init on a fresh Raspbian Lite image

This is a work in Progress!

Purpose

This mainly demonstrates my goal of preparing a Raspberry Pi to be provisioned prior to its first boot. To do this I have chosen to use the same cloud-init that is the standard for provisioning servers at Amazon EC2, Microsoft Azure, OpenStack, etc.

I found this to be quite challenging because there is little information available for using cloud-init without a cloud. So, this project also servers as a demonstration for anyone on any version of Linux who may want to install from source, and/or use without a cloud. If you fall into that later group, you probably just want to read the code. It's bash so everything I do, you could also do at the command line. (Even the for loop.)

@msmyers
msmyers / ntp.conf
Created February 4, 2021 06:37 — forked from phillipuniverse/ntp.conf
Set up NTP with Ansible, dedicating one as a timelord
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
@msmyers
msmyers / setup.sh
Created December 29, 2020 08:27
Sub-CA: self-signed pki automation tool.
#!/usr/bin/env bash
# Assumptions: easyrsa3 available in current dir, and functional openssl.
# This basic example puts the "evoeco_ca" and "children_ca" PKI dirs on the same system.
# A real-world setup would use different systems and transport the public components.
msmyers_ca="evoeco-ca"
# TODO: externalize
nopass="nopass"

Keybase proof

I hereby claim:

  • I am msmyers on github.
  • I am msmyers (https://keybase.io/msmyers) on keybase.
  • I have a public key ASCKtjsOcPrM7iRvq9ROBPnezPWsoBWUJNzP3KK808HuEAo

To claim this, I am signing this object: