eth_blockNumber
: Returns the number of the most recent block.eth_getBlockByNumber
: Returns information about a block by block number.eth_getBlockByHash
: Returns information about a block by block hash.eth_getBlockTransactionCountByNumber
: Returns the number of transactions in a block from a block matching the given block number.eth_getBlockTransactionCountByHash
: Returns the number of transactions in a block from a block matching the given block hash.eth_getUncleCountByBlockNumber
: Returns the number of uncles in a block from a block matching the given block number.eth_getUncleCountByBlockHash
: Returns the number of uncles in a block from a block matching the given block hash.
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
const bitcoin = require('bitcoinjs-lib'); | |
const bip39 = require('bip39'); | |
const bip32 = require('bip32'); | |
// Generate a random mnemonic (12 words) | |
const mnemonic = bip39.generateMnemonic(); | |
console.log('Mnemonic:', mnemonic); | |
// Generate seed from mnemonic | |
const seed = bip39.mnemonicToSeedSync(mnemonic); |
Make sure to install these packages:
- npm install -g @shopify/cli
- npm install -g @shopify/app
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
const mock = jest.mock('@services/plaid', () => { | |
const PlaidService = jest.requireActual('@services/plaid'); | |
return class PlaidServiceMock extends PlaidService { | |
constructor() { | |
super(); | |
this.somefn = jest.fn(() => { | |
return { token: 'test' }; | |
}); | |
} | |
}; |
If you are not using CommonJS on NodeJS and having problems with the intellisense for getting into modules.
- Install
module-alias
andmodule-alias-jest
- Configure your
package.json
file with your aliases:
{
"_moduleAliases": {
"$root": ".",
"$src": "./src",
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
# Error detected while processing .vim/bundle/vim-fugitive/plugin/fugitive.vim: | |
cd && cd /.vim/bundle/vim-fugitive/plugin/ | |
git pull --rebase |
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 express 'express'; | |
const app = express(); | |
app.use(express.json()); | |
app.use(express.bodyParser()); | |
// Using Middlewares | |
// app.use(express.myMiddleWare()) | |
app.post('/', (req, res) => { |
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 * as jwt from 'jsonwebtoken'; | |
const encData = jwt.sign({ name: 'Kautzmann', process.env.SECRET_KEY }); | |
const decData = jwt.verify(encData, process.env.SECRET_KEY); | |
console.log(encData, decData); |
- Creates a file on your root: ~/.curlrc
- Adds
-k
inside of it.
This option allows curl to proceed and operate even for server connections otherwise considered insecure. The server connection is verified by making sure the server's certificate contains the right name and verifies successfully using the cert store.
See this online resource for further details: http://curl.haxx.se/docs/sslcerts.html
NewerOlder