Skip to content

Instantly share code, notes, and snippets.

@egorvas
egorvas / chart-combined.html
Created November 4, 2025 11:05
Анализ балансов блокчейна: количество и процент ошибочных балансов
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdn.plot.ly/plotly-2.27.0.min.js"></script>
<style>
body { font-family: Arial, sans-serif; margin: 20px; }
.chart { margin-bottom: 30px; }
.info-section {
0x5c40ef6f527f4fba68368774e6130ce6515123f2:
name: local='ExtraBalToken' chain='' MISMATCH
decimals: local='18' chain='' MISMATCH
last operation date: 2025-04-15T16:28:59.000Z
0x57d90b64a1a57749b0f932f1a3395792e12e7055:
name: local='Elcoin' chain='' MISMATCH
last operation date: 2020-12-24T10:45:03.000Z
0x8e597bc2e708f83ddbb74355f924397676877cde:
name: local='CryptoCarbon' chain='' MISMATCH
last operation date: 2017-10-10T00:08:33.000Z
// Native Map Size x 165,662,711 ops/sec ±8.85% (69 runs sampled)
// Immutable.js Map Size x 2.20 ops/sec ±8.58% (10 runs sampled)
// Immutable.js OrderedMap Size x 1.98 ops/sec ±15.02% (9 runs sampled)
// Native Object Size x 7.17 ops/sec ±1.73% (22 runs sampled)
// Fastest in sizeSuite is Native Map Size
// Native Map Get x 57.17 ops/sec ±0.61% (75 runs sampled)
// Immutable.js Map Get x 4.05 ops/sec ±2.02% (15 runs sampled)
// Immutable.js OrderedMap Get x 3.64 ops/sec ±1.54% (14 runs sampled)
// Native Object Get x 3.95 ops/sec ±2.39% (14 runs sampled)

Crypto exchanger example

This is a guide on how to implement easy ERC20 coins and Ethereum exchanger based on nodeJS client for the Ethplorer Bulk API Monitor.

Steps

  • Creating a new eth address and sending it to a user
  • Watching this address for new ETH transactions of ERC20 transfers
  • Sending tokens to your cold address with filling address by the current gas price.
  • Sending ETH funds to your cold address
openapi: 3.0.0
x-logo: true
servers:
- url: https://api-mon.ethplorer.io
# - url: https://--.ethplorer.io
# - url: https://-.ethplorer.io
info:
[30.10.2019 20:50:43] {"jsonrpc":"2.0","method":"createSendTx","id":1602966286,"params":["0x617DA121aBf03D4c1AF572F5a4E313E26BeF7BDc","0x59c097e5f87bfc4779227144f351ed7da345017a","idTHBDEMO",10.9303,1,10,1,false]}
[30.10.2019 20:50:43] Create TX: from 0x617DA121aBf03D4c1AF572F5a4E313E26BeF7BDc to 0x59c097e5f87bfc4779227144f351ed7da345017a sending 10.9303 idTHBDEMO
[30.10.2019 20:50:43] ACTUAL NONCE USED:5345
[30.10.2019 20:50:43] GET GAS PRICE
var LoginPage = require('../objects/pages/login.page');
var Dashboard = require('../objects/pages/dashboard.page');
var WithdrawPage = require('../objects/pages/withdraw.page');
var SelectBankAccountPage = require('../objects/pages/selectBankAccount.page');
var AddBankAccountDialog = require('../objects/dialogs/addBankAccount.dialog');
var WithdrawByBankDialog = require('../objects/dialogs/withdrawByBank.dialog');
var WithdrawByCashDeliveryDialog = require('../objects/dialogs/withdrawByCashDelivery.dialog');
var WithdrawByCashPickUpDialog = require('../objects/dialogs/withdrawByCashPickup.dialog');
[Appium] Welcome to Appium v1.6.4-beta.2
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"capabilities":[{"desiredCapabilities":{"appPackage":"com.sixdays.truckerpath.dev","appActivity":"com.sixdays.truckerpath.view.base.SplashActivity","newCommandTimeout":"300","appWaitActivity":"com.sixdays.truckerpath.view.main.MainActivity","takesScreenshot":true,"autoGrantPermissions":true,"platformName":"Android","deviceName":"Android","optionalIntentArguments":"--ez WELCOME_TIP_IS_ACTIVE false --ez SUBSCRIPTION_IS_ACTIVE true --ez SKIP_FILTER_HINT true --ez IS_FORCE_UPDATE_ENABLED false","platform":"ANDROID"}},{"requiredCapabilities":{}}],"desiredCapabilities":{"appPackage":"com.sixdays.truckerpath.dev","appActivity":"com.sixdays.truckerpath.view.base.SplashActivity","newCommandTimeout":"300","appWaitActivity":"com.sixdays.truckerpath.view.main.MainActivity","takesScreenshot":true,"autoGrantPermissions":true,"platformName":"Android","deviceName":"Android","optionalI
[2017-03-11T11:38:03+0300] [ALL] 03-08 13:26:34.993 11326 11326 E AndroidRuntime: FATAL EXCEPTION: main
[2017-03-11T11:38:03+0300] [ALL] 03-08 13:26:34.993 11326 11326 E AndroidRuntime: Process: io.appium.settings, PID: 11326
[2017-03-11T11:38:03+0300] [ALL] 03-08 13:26:34.993 11326 11326 E AndroidRuntime: java.lang.RuntimeException: Unable to start service io.appium.settings.LocationService@c76b0e5 with Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=io.appium.settings/.LocationService (has extras) }: java.lang.SecurityException: io.appium.settings from uid 10312 not allowed to perform MOCK_LOCATION
[2017-03-11T11:38:03+0300] [ALL] 03-08 13:26:34.993 11326 11326 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3061)
[2017-03-11T11:38:03+0300] [ALL] 03-08 13:26:34.993 11326 11326 E AndroidRuntime: at android.app.ActivityThread.-wrap17(ActivityThread.java)
[2017-03-11T11:38:03+0300] [ALL] 03-08 13:26:34.993 11326 11326 E AndroidRuntime:
@egorvas
egorvas / gist:d75bc9e2f0454ca821f0
Created October 23, 2015 13:42
DB Migration: Update Post Types Counts
var businesses = db.getCollection('businesses').find({});
businesses.map(function(business) {
var posts = db.getCollection('posts').find({_business: business._id});
var postTypesCount = {
idea: 0, offer: 0, news: 0, problem: 0, question: 0, review: 0
};
posts.forEach(function(post) {
postTypesCount[post.type]++;
})
return db.getCollection('businesses').update({_id: business._id}, {$set: {