Skip to content

Instantly share code, notes, and snippets.

View kolya-t's full-sized avatar

Nikolay Toporkov kolya-t

View GitHub Profile
@kolya-t
kolya-t / do-subnets.sh
Created November 21, 2018 09:44
Script will create subnets directory with subnets
#!/bin/sh
# script will create 2 dirs iprange and subnets
# iprange dir will contain iprange tool
# subnets dir will contain GeoIP subnets files
# install iprange
mkdir iprange
cd iprange
wget https://raw.githubusercontent.com/haproxy/haproxy/master/contrib/iprange/Makefile
#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct Note {
string firstName;
string lastName;
string phone;
#include <iostream>
#include <array>
#include <algorithm>
#include <cmath>
using namespace std;
template <class T, std::size_t N>
ostream& operator<<(ostream& o, const array<T, N>& arr)
{
@kolya-t
kolya-t / package.json
Last active January 29, 2019 10:07
tron-accounts
{
"main": "tron-accounts.js",
"scripts": {
"start": "node tron-accounts.js"
},
"dependencies": {
"axios": "^0.18.0",
"progress": "^2.0.3"
}
}
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "ethAddress",
"type": "address"
},
{
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "tronAddress",
"type": "address"
}
],
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "tronAddress",
"type": "address"
}
],
INFURA_API_KEY=c793163094c44d72918d61fbefe050f8
MNEMONIC="caught chess glide pill dream print car neutral immense scrap neglect adult"
pragma solidity >=0.5.3 <0.6.0;
contract TronRegister {
event RegisterAdd(address indexed ethAddress, address indexed tronAddress);
mapping(address => address) private ethToTronMapping;
function put(address _tronAddress) external {
address ethAddress = msg.sender;
[
{
"constant": true,
"inputs": [
{
"name": "_addr",
"type": "address"
},
{
"name": "_index",