Skip to content

Instantly share code, notes, and snippets.

View poma's full-sized avatar

Roman Semenov poma

View GitHub Profile
@poma
poma / update-brew.sh
Last active November 3, 2021 13:25
Updates homebrew after migration to apple silicon
# reinstall arm64 brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# add this to your env
alias brew-old="arch -x86_64 /usr/local/bin/brew"
export PATH="/opt/homebrew/bin:$PATH"
# reinstall packages
brew-old leaves | xargs brew install
$ ganache-cli --mnemonic "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat"
Ganache CLI v6.9.1 (ganache-core: 2.10.2)
Available Accounts
==================
(0) 0x627306090abaB3A6e1400e9345bC60c78a8BEf57 (100 ETH)
(1) 0xf17f52151EbEF6C7334FAD080c5704D77216b732 (100 ETH)
(2) 0xC5fdf4076b8F3A5357c5E395ab970B5B54098Fef (100 ETH)
(3) 0x821aEa9a577a9b44299B9c15c88cf3087F3b5544 (100 ETH)
(4) 0x0d1d4e623D10F9FBA5Db95830F7d3839406C6AF2 (100 ETH)
@poma
poma / tmutil_exclude.sh
Last active May 4, 2022 01:29
Exclude dependency dirs from Time Machine backups
tmutil_exclude() {
# todo: recurse to parent dirs to support commands that execute in project subdirs
DIR=$1
DEP_FILE=$2
if [ -d "$DIR" ] && [ -f "$DEP_FILE" ] && ! tmutil isexcluded "$DIR" | grep -q '\[Excluded\]'; then
tmutil addexclusion "$DIR"
echo "tmutil: ${DIR} has been excluded from Time Machine backups"
fi
}
version: '{build}'
image: Visual Studio 2017
configuration: Release
assembly_info:
patch: true
file: Hotsapi.Uploader.Windows\AssemblyInfo.*
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
install:
version: '2.2'
volumes:
elastic:
kibana:
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.3.0
[2150] PUSH32 0x25147dcc3df52742c7329ca5563c4c4fd696489c63394bc1415ecbfb1226875f
[2151] DUP9
[2152] ADDMOD
[2153] SWAP2
[2154] POP
[2156] PUSH1 0x00
[2157] DUP1
[2158] MLOAD
[2160] PUSH1 0x20
[2163] PUSH2 0x763d
pragma solidity ^0.5.8;
contract MiMC {
uint constant FIELD_SIZE = 21888242871839275222246405745257275088548364400416034343698204186575808495617;
function MiMCSponge(uint256 xL, uint256 xR) public pure returns (uint256, uint256) {
uint exp;
uint t;
uint xR_tmp;
t = xL;

Keybase proof

I hereby claim:

  • I am poma on github.
  • I am poma (https://keybase.io/poma) on keybase.
  • I have a public key ASC0k3quV1tpseoGJWSpm_wuh-1lqCvtXrzWmpiPvImY9wo

To claim this, I am signing this object:

@poma
poma / stats.md
Created July 25, 2019 08:14
Tornado mixer stats

First deposit is supposed to take more gas than the next ones

Deposit gas tx1 tx2 tx3
1 174488
2 225334 175094
3 276194 225890 195954
16 937438 887070 857134
17 988298 937994 907994
18 1039158 988854 958854
> gethead (-1,8000000000000000,5):B338CC6B2D6ECC21725BA3F40CED779B9C6548E07C034E47F2944C30C24A8466:352A3EBC174BBDDC5B013128EEA0689D8A60C3D7ED11B9EC939F664BEADA48D8
[ 3][t 2][1559335521.277084112][test-lite-client.cpp:920][!testnode] got block header request for (-1,8000000000000000,5):B338CC6B2D6ECC21725BA3F40CED779B9C6548E07C034E47F2944C30C24A8466:352A3EBC174BBDDC5B013128EEA0689D8A60C3D7ED11B9EC939F664BEADA48D8 with mode 65535
[ 3][t 2][1559335521.456561089][test-lite-client.cpp:935][!query] obtained block header for (-1,8000000000000000,5):B338CC6B2D6ECC21725BA3F40CED779B9C6548E07C034E47F2944C30C24A8466:352A3EBC174BBDDC5B013128EEA0689D8A60C3D7ED11B9EC939F664BEADA48D8 from server
[ 3][t 1][1559335521.456691027][test-lite-client.cpp:989][!testnode] obtained 751 data bytes as block header for (-1,8000000000000000,5):B338CC6B2D6ECC21725BA3F40CED779B9C6548E07C034E47F2944C30C24A8466:352A3EBC174BBDDC5B013128EEA0689D8A60C3D7ED11B9EC939F664BEADA48D8
SPECIAL x{03B338CC6B2D6ECC21725BA3F40CED779B9C6548E07C034E47F2944C3