brew update
brew install asdf openssl@1.1
EDITOR=nano brew edit wxmac # Edit the file according to wxmac.patch
brew install wxmac --build-from-source
asdf plugin add erlang
asdf plugin add elixir
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
package main | |
import ( | |
"bytes" | |
"encoding" | |
"encoding/binary" | |
"io" | |
"fmt" | |
"stockbit.com/proto/ouch42" |
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
module slice | |
func InterfaceSlice(slice interface{}) []interface{} { | |
switch slice := slice.(type) { | |
case []string: | |
new := make([]interface{}, len(slice)) | |
for i, v := range slice { | |
new[i] = v | |
} | |
return new |
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 decimals = 4; | |
const regexpDecimals = new RegExp(`^\\d*\\.{0,1}\\d{0,${decimals}}$`); | |
const SignupSchema = Yup.object().shape({ | |
decimal: Yup.number().test( | |
'is-decimal', | |
'too many decimals', | |
value => (value + "").match(regexpDecimals), | |
), | |
}); |
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
// See: https://github.com/maticnetwork/matic.js/blob/master/examples/POS-client/config.js | |
const posRootChainManager = '0xBbD7cBFA79faee899Eaf900F13C9065bF03B1A74'; | |
const posERC20Predicate = '0xdD6596F2029e6233DEFfaCa316e6A95217d4Dc34'; | |
const accounts = useAccounts(); | |
const userAddress = accounts?.[0] | |
const rootDaiContract = useContractContext(DAIDummyContext, 0); | |
const { send: approve } = useContractFunc(rootDaiContract, "approve"); |
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 path = require('path') | |
const { readFileSync } = require('fs') | |
const schemaString = readFileSync(`${__dirname}/data/schema.graphql`, 'utf8') | |
module.exports = { | |
root: true, | |
plugins: [ | |
// 'jest', | |
'@typescript-eslint', |
# Install pgp
brew install gnupg
# Write out the hashicorp public pgp key
cat <<EOF > hashicorp.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFMORM0BCADBRyKO1MhCirazOSVwcfTr1xUxjPvfxD3hjUwHtjsOy/bT6p9f
W2mRPfwnq2JB5As+paL3UGDsSRDnK9KAxQb0NNF4+eVhr/EJ18s3wwXXDMjpIifq