Skip to content

Instantly share code, notes, and snippets.

@stabastian
stabastian / settings.json
Created March 17, 2020 19:22
VS Code, set directories in where to import solidity packages.
{
"solidity.packageDefaultDependenciesContractsDirectory": "",
"solidity.packageDefaultDependenciesDirectory": "node_modules"
}
@stabastian
stabastian / mysql_docker.sh
Last active April 2, 2020 19:45
Docker MySql Dump
# Dump
docker run --rm -i mysql:TAG /usr/bin/mysqldump -uroot -proot --skip-comments DATABASE_NAME > dump_`date +%Y-%m-%d"_"%H-%M-%S`.sql
# Restore
cat dump.sql | docker run --rm -i mysql:TAG /usr/bin/mysql -uroot -proot DATABASE_NAME
@stabastian
stabastian / machine_engine.md
Created June 21, 2019 15:53
Machine engine

Introduction

The computer driven markets for instruments like stocks and exchange traded stock options, have transformed finance and the flow of capital. These markets are enabled by order matching engines (and the infrastructure that supports this software). Before computer trading networks and matching engines, stocks where traded on cavernous exchange floors and transaction costs where high. When electronic trading fully matured, floor traders were a fading anachronism and transaction costs had been reduced to pennies a share in many cases. Electronic trading could not exist without advanced network infrastructure, but without the software matching engines no shares would change hands. The computer trading networks, the matching engine software has also created a concentrated nexus of potential failure. Failures in these systems have increased as the frequency and volume on the electronic networks has increased. The position of order matching engines in the trading infrastructure makes these systems o

@stabastian
stabastian / keystoreV3generator.js
Created April 16, 2019 15:36
KeystoreV3 generator
const ethWallet = require('ethereumjs-wallet');
const bip39 = require('bip39');
const hdkey = require('ethereumjs-wallet/hdkey');
const mnemonic = bip39.generateMnemonic();
const hdWallet = hdkey.fromMasterSeed(bip39.mnemonicToSeedSync(mnemonic));
// get the firts account using the ethereum standard hd path.
const walletHdPath = "m/44'/60'/0'/0/0";
@stabastian
stabastian / noip2.service
Created August 11, 2017 21:57
Simple No-ip.com Dynamic DNS Updater
# Simple No-ip.com Dynamic DNS Updater
#
# 1) Install binary as described in no-ip.com's source file (assuming results in /usr/local/bin)
# 2) Run sudo /usr/local/bin/noip2 -C to generate configuration file
# 3) Copy this file noip2.service to /etc/systemd/system/
# 4) Execute `sudo systemctl enable noip2`
# 5) Execute `sudo systemctl start noip2`
#
# systemd supports lots of fancy features, look here (and linked docs) for a full list:
# http://www.freedesktop.org/software/systemd/man/systemd.exec.html