Skip to content

Instantly share code, notes, and snippets.

@brunopgalvao
brunopgalvao / output.md
Created July 22, 2022 23:27
rustup show / rustup +nightly show

Here is the setup for my Apple M1 Pro:

$ rustup show         
Default host: x86_64-apple-darwin
rustup home:  /Users/bruno/.rustup

installed toolchains
--------------------
@brunopgalvao
brunopgalvao / node-start-local-testing.sh
Last active July 18, 2022 17:42
good for testing substrate-parachain-template after it has been updated
# NOTE: assumes `substrate-docs` is locally `docs`
# Build Spec
./target/release/polkadot build-spec --chain rococo-local --disable-default-bootnode > rococo-custom-2-plain.json
./target/release/polkadot build-spec --chain rococo-custom-2-plain.json --raw --disable-default-bootnode > rococo-custom-2-raw.json
# (OPTIONAL) modify from snipets to copy and make 3 & 4 validator plain specs
# ./target/release/polkadot build-spec --chain rococo-custom-3-plain.json --raw --disable-default-bootnode > rococo-custom-3-raw.json
# ./target/release/polkadot build-spec --chain rococo-custom-4-plain.json --raw --disable-default-bootnode > rococo-custom-4-raw.json
@brunopgalvao
brunopgalvao / config.toml
Created June 25, 2022 19:09
basic config for zombienet
[relaychain]
default_command = "../polkadot/target/release/polkadot"
default_args = [ "-lparachain=debug" ]
chain = "rococo-local"
[[relaychain.nodes]]
name = "alice"
validator = true
@brunopgalvao
brunopgalvao / config.js
Created May 11, 2022 18:17
polkadot-launch working config
// Collator flags
var flags = ["--", "--execution=wasm"];
var config = {
relaychain: {
bin: "./bin/polkadot",
chain: "rococo-local",
nodes: [
{
name: "alice",
@brunopgalvao
brunopgalvao / config.json
Created March 8, 2022 17:22
polkadot-launch config with debugging
{
"relaychain": {
"bin": "./bin/polkadot",
"chain": "rococo-local",
"nodes": [
{
"name": "alice",
"wsPort": 9944,
"port": 30444
},
@brunopgalvao
brunopgalvao / config.json
Last active March 7, 2022 21:09
polkadot-launch config file
{
"relaychain": {
"bin": "./bin/polkadot",
"chain": "rococo-local",
"nodes": [
{
"name": "alice",
"wsPort": 9944,
"port": 30444
},
@brunopgalvao
brunopgalvao / test.js
Created March 13, 2020 17:59
Test the Slack bug. Slack this, copy it, execute it and see if it works or you get the invisible character bug
const test = () => {
console.log("It works!");
}
test();
@brunopgalvao
brunopgalvao / uglyXmasSweater.js
Created December 6, 2019 04:16
ugly xmas sweater template for custom sweater :)
const ugly =
(x) => true
console.log(ugly(
{
name: 'sweater',
type: 'xmas'
}
) ?
'UGLY XMAS SWEATER'
@brunopgalvao
brunopgalvao / surge-deployment-instructions.md
Last active November 15, 2019 20:26
This is how you deploy a create-react-app to surge.sh

cd into your react app and do the following:

npm run build
cd build/
mv index.html 200.html
npx surge
@brunopgalvao
brunopgalvao / InstallingIssue.bash
Created February 13, 2019 21:23
solve Ruby issue
```
brew uninstall ruby
\curl -sSL https://get.rvm.io | bash -s stable --ruby
rvm install ruby-2.4
rvm use ruby-2.4
gem install bundler
bundle install
```