Skip to content

Instantly share code, notes, and snippets.

antonydenyer / web3js-tuple.js
Created July 14, 2023 15:31
Multicall web3js tuple encoding
const { Web3 } = require("web3");
async function multiCall() {
const abi =
"stateMutability": "payable",
"type": "function",
"name": "aggregate3",
"inputs": [
antonydenyer / toRoman.js
Created April 8, 2021 08:49
romanNumerals in js
const toRoman = (numeral) =>
new Array(numeral + 1)
.replaceAll('IIIII', 'V')
.replaceAll('VV', 'X')
.replaceAll('XXXXX', 'L')
.replaceAll('LL', 'C')
.replaceAll('CCCCC', 'D')
.replaceAll('DD', 'M')
.replaceAll('IIII', 'IV')
antonydenyer /
Created October 26, 2019 13:10

Keybase proof

I hereby claim:

  • I am antonydenyer on github.
  • I am antonydenyer ( on keybase.
  • I have a public key whose fingerprint is 2CD7 D01A 1C9E FFAD E60F A1B9 0977 3615 F91A 8498

To claim this, I am signing this object:

spotless {
java {
// This path needs to be relative to each project
target fileTree('.') {
include '**/src/*/java/**/*.java'
exclude '**/.gradle/**'
exclude '**/generated/**'
antonydenyer / 0x61bb711d3d431F404B06505848a9e9C999a83c31
Created June 13, 2019 21:30
FROM ubuntu:bionic
RUN apt-get update && \
apt-get -y -qq upgrade && \
apt-get -y -qq install software-properties-common && \
add-apt-repository ppa:ethereum/ethereum && \
apt-get update && \
apt-get -y -qq install geth-unstable solc && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*


Problem description

The Kata says you should write a function to convert from Decimals to Roman numerals. In order to keep the kata light, we will not check for valid Roman Numeral.

Roman numerals, the numeral system of ancient Rome, uses combinations of letters from the Latin alphabet to signify values. They are based on seven symbols:

set -e
echo "Updating known host for $1 ..."
KEY=$(ssh-keyscan -t ecdsa-sha2-nistp256 $1 2> /dev/null)
if grep -q $1 ~/.ssh/known_hosts;
sed -i "" "s/$1.*$/$ESCAPED_KEY/g" ~/.ssh/known_hosts
antonydenyer /
Created February 2, 2017 10:04 — forked from mrflip/
Elasticsearch Tuning Plan

Next Steps

  • Measure time spend on index, flush, refresh, merge, query, etc. (TD - done)
  • Take hot threads snapshots under read+write, read-only, write-only (TD - done)
  • Adjust refresh time to 10s (from 1s) and see how load changes (TD)
  • Measure time of a rolling restart doing disable_flush and disable_recovery (TD)
  • Specify routing on query -- make it choose same node for each shard each time (MD)
  • GC new generation size (TD)
  • Warmers
  • measure before/after of client query time with and without warmers (MD)