Skip to content

Instantly share code, notes, and snippets.

View aeharvlee's full-sized avatar
👊
KEEP GOING

Denver aeharvlee

👊
KEEP GOING
View GitHub Profile
@miguelmota
miguelmota / sha3.go
Last active September 24, 2022 02:26
Ethereum Sha3 (Keccak256) in Golang
package main
import (
"encoding/hex"
"fmt"
"github.com/ethereum/go-ethereum/crypto/sha3"
)
func main() {
hash := sha3.NewKeccak256()

Notes on Scheduler Tracing in GoLang

$ export GODEBUG=schedtrace=1000

*scheddetail*: setting schedtrace=X and scheddetail=1 causes the scheduler to emit
detailed multiline info every X milliseconds, describing state of the scheduler,
processors, threads and goroutines.

*schedtrace*: setting schedtrace=X causes the scheduler to emit a single line to standard
error every X milliseconds, summarizing the scheduler state.
@deepakraous
deepakraous / recap-1.md
Last active January 13, 2022 13:03
Recap Part[1-6] of Medium Post

Introduction

  • Ethereum is a world computer.
  • Ethereum is a combination of A Singular World State+ A Virtual Machine.
  • World State is a collection of all States.
  • A State is a collection of Blocks.
  • The World State is stored as a Patricia Merkle Trie as per Recursive Length Prefix(RLP) spec in a mini Database.
  • Only a Virtual Machine can add a new State.
  • The Virtual Machine needs fuel to execute instructions and the fuel is ‘Ether’ to prevent rogue actions.
@w3kim
w3kim / caver-js_bytes32.js
Created October 1, 2019 02:17
Using bytes32 with caver-js
const Caver = require('caver-js');
const caver = new Caver('https://api.baobab.klaytn.net:8651');
const acct = caver.klay.accounts.privateKeyToAccount('your_private_key')
caver.klay.accounts.wallet.add(acct)
/*
We will use the following contract to demonstrate the use of bytes32:
pragma solidity 0.4.24;
@nickcernis
nickcernis / mariadb-brew-macos.md
Created July 13, 2020 15:13
Install MariaDB with brew on macOS and fix the “access denied” issue

Attempting mysql -u root fails with Access denied for user 'root'@'localhost immediately after doing brew install mariadb and starting mariadb with brew services start mariadb.

To fix it (with MariaDB still running):

  1. sudo mysql then enter your Mac user password
  2. ALTER USER 'root'@'localhost' IDENTIFIED BY 'newrootpassword'; replacing newrootpassword with the password you wish to use for the MariaDB root user.
  3. Ctrl-C to exit mysql.

You should then be able to connect to MariaDB with mysql -u root -p, then entering the root password when prompted.