This is an example of Go code calling to a C++ library with a C wrapper.
go build # this only ensures it compiles| " Fisa-vim-config | |
| " http://fisadev.github.io/fisa-vim-config/ | |
| " version: 8.3.1 | |
| " ============================================================================ | |
| " Vim-plug initialization | |
| " Avoid modify this section, unless you are very sure of what you are doing | |
| " Vim Tab as 4 Spaces | |
| set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab |
| // exporting from a bs58 private key to an Uint8Array | |
| // == from phantom private key to solana cli id.json key file | |
| // npm install bs58 @solana/web3.js | |
| const web3 = require("@solana/web3.js"); | |
| const bs58 = require('bs58'); | |
| let secretKey = bs58.decode("[base58 private key here]"); | |
| console.log(`[${web3.Keypair.fromSecretKey(secretKey).secretKey}]`); | |
| // exporting back from Uint8Array to bs58 private key |
| <script src="https://raw.github.com/bitwiseshiftleft/sjcl/master/sjcl.js"></script> | |
| <script src="https://raw.github.com/bitwiseshiftleft/sjcl/master/core/bn.js"></script> | |
| <script src="https://raw.github.com/bitwiseshiftleft/sjcl/master/core/ecc.js"></script> | |
| <script> | |
| // Overwrite NIST-P256 with secp256k1 | |
| sjcl.ecc.curves.c256 = new sjcl.ecc.curve( | |
| sjcl.bn.pseudoMersennePrime(256, [[0,-1],[4,-1],[6,-1],[7,-1],[8,-1],[9,-1],[32,-1]]), | |
| "0x14551231950b75fc4402da1722fc9baee", | |
| 0, | |
| 7, |
| // SPDX-License-Identifier: MIT | |
| // https://tornado.cash | |
| /* | |
| * d888888P dP a88888b. dP | |
| * 88 88 d8' `88 88 | |
| * 88 .d8888b. 88d888b. 88d888b. .d8888b. .d888b88 .d8888b. 88 .d8888b. .d8888b. 88d888b. | |
| * 88 88' `88 88' `88 88' `88 88' `88 88' `88 88' `88 88 88' `88 Y8ooooo. 88' `88 | |
| * 88 88. .88 88 88 88 88. .88 88. .88 88. .88 dP Y8. .88 88. .88 88 88 88 | |
| * dP `88888P' dP dP dP `88888P8 `88888P8 `88888P' 88 Y88888P' `88888P8 `88888P' dP dP | |
| * ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo |
| version: '2.2' | |
| services: | |
| elasticsearch: | |
| image: docker.elastic.co/elasticsearch/elasticsearch:6.4.1 | |
| container_name: elasticsearch | |
| environment: | |
| - cluster.name=docker-cluster | |
| - bootstrap.memory_lock=true | |
| - "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
| ulimits: |
| #### | |
| # пути к ключам будут вида /solana/validator-keypair.json | |
| # а на хосте они будут лежать в папке /root/solana_blabla. например /root/solana_agx10k | |
| #### | |
| #######################################dockerfile#### | |
| echo "export SOLANA_NAME=<имя>" | tee -a ~/.bashrc ### например AG | |
| source ~/.bashrc | |
| echo "export SOLANA_DIR=/root/solana_${SOLANA_NAME}" | tee -a ~/.bashrc |
Following the documentation on online.net would get IPv6 to work only in a simple system installation but won't get IPv6 to work with virtualization environment (Exp. Proxmox) as It's missing some IPv6 forwards and proxies on sysctl.conf.
| #!/bin/sh | |
| cd $1 | |
| git filter-branch --commit-filter ' | |
| if [ "$GIT_COMMITTER_EMAIL" = "[email protected]" ] | |
| then | |
| git commit-tree -S "$@"; | |
| fi |
| #!/usr/bin/env python2.7 | |
| # -*- coding: utf-8 -*- | |
| import nacl.secret | |
| import nacl.utils | |
| import base64 | |
| from pyblake2 import blake2b | |
| import getpass |