Skip to content

Instantly share code, notes, and snippets.

Mikko Ohtamaa miohtama

View GitHub Profile
miohtama / transaction-helper.component.ts
Created May 26, 2020
TypeScript + Angular Ethereum transaction progress bar component
View transaction-helper.component.ts
import { Component, OnInit, Input, ViewChild, Output, EventEmitter } from '@angular/core';
import { Web3Service, WalletState, WalletType } from '../web3.service';
import Web3 from 'web3';
import { waitTransaction, isSuccessfulTransaction } from '../transactionwait';
import { isRequired, checkRequired } from '../requiredInput';
import { EthereumProgressBarComponent } from '../ethereum-progress-bar/ethereum-progress-bar.component';
import { Subscription } from 'rxjs';
import { NGXLogger } from 'ngx-logger';
// Called before creating a tranaction.
miohtama / launch.json
Created Feb 13, 2020
Launching Jest e2e+NestJS from Visual Studio Code - so you can hit breakpoints
View launch.json
"version": "0.2.0",
"configurations": [
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
View Adding more timeout to Visual Studio Code launch json
"version": "0.2.0",
"configurations": [
"type": "node",
"request": "launch",
"name": "Launch user.e2e test",
"runtimeExecutable": "npm",
"cwd": "${workspaceFolder}",
"runtimeArgs": [
View Setting Node PATH and using NPM command in Visual Studio Code launch configuration
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit:
"version": "0.2.0",
"configurations": [
"type": "node",
"request": "launch",
"name": "Launch MailerLite test",
miohtama / main.js
Last active Sep 25, 2019
Ledger topping up the gas for stuck Ethereum nonce/transaction
View main.js
// Based on
const Transport = require('@ledgerhq/hw-transport-node-hid').default
const AppEth = require('@ledgerhq/hw-app-eth').default
miohtama /
Created Aug 28, 2018
Python client for Civic sign in and proof of identity
import base64
import datetime
import hashlib
import hmac
import json
import uuid
import logging
import time
from requests import Session
import binascii
View gist:93b87a963dcc7c944b5d5e6142815347
============================= test session starts ==============================
platform darwin -- Python 3.6.3, pytest-3.2.5, py-1.5.2, pluggy-0.4.0
rootdir: /Users/mikkoohtamaa/code/tm/trading.smartcontracts, inifile: setup.cfg
plugins: populus-1.11.2
collected 3 items
trading/smartcontracts/tests/ Failed signature is, number: 1 data: {'hash': '0x672e1c3f1f05f9958404b1dab1bf456af28316948a1fb08d11160b3cc2aa2eaa', 'hash_bytes': b'g.\x1c?\x1f\x05\xf9\x95\x84\x04\xb1\xda\xb1\xbfEj\xf2\x83\x16\x94\x8a\x1f\xb0\x8d\x11\x16\x0b<\xc2\xaa.\xaa', 'v': 27, 'r': HexBytes('0xa8dfdf50446708ccbca3ca72bf9d91de80510b80425e9f6b0b8a63abafad7ebb'), 's': HexBytes('0x89d58c596550d1855f361c4c294d869d3849d6e55fb1a29909d0debb599b64')}
Failed signature is, number: 14 data: {'hash': '0x7cd030aaa0481365a76e22a9a08b284f837f892adbeac43ddb4cda81550204a5', 'hash_bytes': b'|\xd00\xaa\xa0H\x13e\xa7n"\xa9\xa0\x8b(O\x83\x7f\x89*\xdb\xea\xc4=\xdbL\xda\x81U\x02\x04\xa5', 'v': 27, 'r': HexBytes('0x9b053ffcd13e05dd03b81f1094d43f8621
miohtama / parity.yaml
Created Aug 25, 2017
Parity Ansibe playbook
View parity.yaml
- name: Install dependencies
apt: name={{item}} update_cache=yes
- software-properties-common
become: yes
- name: Install Ethereum repositories
apt_repository: repo='ppa:ethereum/ethereum'
become: yes
View gist:37d8741062dbc75ff42b812e3a8a3a18
### Keybase proof
I hereby claim:
* I am miohtama on github.
* I am miohtama ( on keybase.
* I have a public key ASDwaisR2H0nqRfKMZtmDm_TeYoL490VnTKFIISsi_jCAwo
To claim this, I am signing this object:
View Raven in JavaScript
try {
$(document).ready(function() {
// ...
window.javascriptReady = true;
} catch(e) {
if (window.Raven) {
You can’t perform that action at this time.