I hereby claim:
- I am ravidsrk on github.
- I am ravidsrk (https://keybase.io/ravidsrk) on keybase.
- I have a public key ASAV6LcXbZuWsvh6h_S6dSNoAVSavsR9fzS2bcfduWsquwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
const _ = require("lodash"); | |
const BnbApiClient = require("@binance-chain/javascript-sdk"); | |
const kava = require("@kava-labs/javascript-sdk"); | |
const bnbCrypto = BnbApiClient.crypto; | |
const KavaClient = kava.KavaClient; | |
const kavaUtils = kava.utils; | |
const BINANCE_CHAIN_API_TESTNET = "https://testnet-dex.binance.org"; | |
const BINANCE_CHAIN_DEPUTY = "tbnb1et8vmd0dgvswjnyaf73ez8ye0jehc8a7t7fljv"; | |
const bnbAddress = "your binance chain testnet address"; |
# Quickly fix one file | |
npx prettier --write your-file.html | |
# Quickly fix all files of one type | |
npx prettier --write src/**/*.{js,jsx} |
Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex
command line tool.
To learn more about migrations, check out this article on the different types of database migrations!
package main | |
import ( | |
"fmt" | |
"net/http" | |
"sort" | |
"time" | |
) | |
// a struct to hold the result from each request including an index |
export const contracts = { | |
"0x1d462414fe14cf489c7a21cac78509f4bf8cd7c0": { | |
id: "canyacoin" | |
}, | |
"0x5f3789907b35dce5605b00c0be0a7ecdbfa8a841": { | |
id: "content-and-ad-network", | |
}, | |
"0xdd974d5c2e2928dea5f71b9825b8b646686bd200": { | |
id: "kyber-network" | |
}, |
sudo apt-get install openssl libssl-dev libudev-dev | |
sudo apt-get install software-properties-common -y | |
sudo add-apt-repository -y ppa:ethereum/ethereum -y | |
sudo apt-get update | |
sudo apt-get install ethereum | |
bash <(curl https://get.parity.io -L) | |
parity — cache-size 62000 — warp — jsonrpc-interface "206.189.140.131" — jsonrpc-apis "all" — ipc-apis "web3,eth,personal,pubsub,net,parity,parity_pubsub,parity_accounts,traces,rpc,secretstore" — jsonrpc-port "8545" — mode "active" — chain "mainnet" — min-peers 50 — max-peers 200 |
Not all random values are created equal - for security-related code, you need a specific kind of random value.
A summary of this article, if you don't want to read the entire thing:
Math.random()
. There are extremely few cases where Math.random()
is the right answer. Don't use it, unless you've read this entire article, and determined that it's necessary for your case.crypto.getRandomBytes
directly. While it's a CSPRNG, it's easy to bias the result when 'transforming' it, such that the output becomes more predictable.uuid
, specifically the uuid.v4()
method. Avoid node-uuid
- it's not the same package, and doesn't produce reliably secure random values.random-number-csprng
.You should seriously consider reading the entire article, though - it's
Principles of Adult Behavior