This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let pancakeSwapAbi = [ | |
{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"}, | |
]; | |
let tokenAbi = [ | |
{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}, | |
]; | |
const Web3 = require('web3'); | |
/* | |
Required Node.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controller\Admin; | |
use App\Admin\Field\ControllerIndexField; | |
use EasyCorp\Bundle\EasyAdminBundle\Collection\FieldCollection; | |
use EasyCorp\Bundle\EasyAdminBundle\Config\Action; | |
use EasyCorp\Bundle\EasyAdminBundle\Config\Actions; | |
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud; | |
use EasyCorp\Bundle\EasyAdminBundle\Config\KeyValueStore; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ "$EUID" -ne 0 ];then | |
>&2 echo "This script requires root level access to run" | |
exit 1 | |
fi | |
if [ -z "${WORDPRESS_DB_PASSWORD}" ]; then | |
>&2 echo "WORDPRESS_DB_PASSWORD must be set" | |
>&2 echo "Here is a random one that you can paste:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
import base58 | |
import sys | |
prefix_dict = { | |
"xprv": "0488ade4", # Mainnet - P2PKH or P2SH - m/44'/0' | |
"yprv": "049d7878", # Mainnet - P2WPKH in P2SH - m/49'/0' | |
"zprv": "04b2430c", # Mainnet - P2WPKH - m/84'/0' | |
"Yprv": "0295b005", # Mainnet - Multi-signature P2WSH in P2SH | |
"Zprv": "02aa7a99", # Mainnet - Multi-signature P2WSH |
Badoo Tech Blog: https://tech.badoo.com/ru/
"Производительность PHP: планируем, профилируем, оптимизируем": https://habr.com/ru/company/badoo/blog/430722/
Preload RFC: https://wiki.php.net/rfc/preload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Support\Arr; | |
trait CanBeReplicated | |
{ | |
public function replicateTo(string $model, array $with = null, array $except = null) | |
{ | |
$defaults = [ | |
$this->getKeyName(), |
Badoo Tech Blog: https://tech.badoo.com/ru/
Double VS single quotes: https://habr.com/ru/company/alfa/blog/447416/
NewerOlder