Byte-Sized Tech Tips Round-Up: Week 2
Published: 2020-10-22 17:14:23

## Using a Dictionary -- in Bash?!

> From
> {% user stevemar %}

There's already tons of literature on this topic but it's something I learned this week. The reason why I'm doing this will come in another post ;) 

*Note, you'll need bash 4.0 or newer for this to work.*

```bash
#!/usr/bin/env bash

declare -A dict

dict=(["fruit"]="apple" ["meat"]="chicken" ["dairy"]="cheese")

for i in "${!dict[@]}"
do
    echo "$i"="${dict[$i]}"
done
```

Running it prints:

```bash
$ ./main.sh 
dairy=cheese
fruit=apple
meat=chicken
```

## Clean up your git changes

> From
> {% user stevemar %}

Git - the tool you never stop learning about. How have I *just* learned to clean up a bunch of changes in one go?!

```
git checkout .
```

And here I was doing `git restore foo.bar` ... all that time wasted! Thanks [JJ Asghar](https://dev.to/jjasghar)!

## Docusaurus

> From
> {% user poojamakes %}

This week I got my hands dirty setting up a new site for our Bee Travels project. It uses GitHub pages and is available [here](https://bee-travels.github.io/).

I've created static sites with GitHub pages before but this time was different because we decided to use [Docusaurus](https://docusaurus.io/) which was open sourced by Facebook, see the [Docusaurus Git Repo](https://github.com/facebook/docusaurus).

I was blown away by just how simple it was to set up and how many things were included out of the box. We were even able to embed a running instance of our application too!

*Embedded application*
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/jzkt0z70yp1uvovgy8h5.png)

*Instructions & Docs*
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rji3i34k79b342rv55n6.png)

Check out the [Bee Travels GitHub Pages Repo](https://github.com/bee-travels/bee-travels.github.io) for how we configured Docusaurus.

## Skype a Scientist

> From [Nigel](https://www.linkedin.com/in/pnigelbrown/)

Volunteering and mentoring is essential to growing your career at any company. IBM emphasizes these types of activities. I recently signed up to participate with [Skype a Scientist](https://www.skypeascientist.com/) where professionals in STEM fields are connected with schools to present to students.

Yesterday was my first session. I spoke with students from Emerson Elementary School in California. I told them about supercomputers and showed them a few single board computers. They most wanted to know about Minecraft :) 

Below are a few of the questions they asked:

* What kind of a scientist are you?
* Give us examples of experiments that you do.
* Do you create video games?
* Are you always on the computer?

If you're even a little bit interested I would encourage you to sign up as it was a very rewarding experience.

## Managing your Node.js versions

> From
> {% user jritten %} 

My FAVORITE tool for managing the various Node.js versions I have installed for different projects is [Node Version Manager (nvm)](https://github.com/nvm-sh/nvm). It’s super simple to install and to use.

*Pro-Tip: I recommend using Terminal and not iTerm since iTerm will not hold onto nvm and you’ll have to continuously re-install it.*

Check out the following tutorial to quickly install and start using nvm! I’ve included the following code snippets as well. Voila!

```bash
# Install using curl
curl -sL https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh -o install_nvm.sh

# run the install script with bash
bash install_nvm.sh

# confirm that your profile is updated *
export NVM_DIR="$HOME/.nvm"
# load nvm *
  [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# load nvm bash_completion *
  [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" 

# restart your terminal
source ~/.bash_profile

# verify it worked // should return 'nvm'
command -v nvm

# Using brew, install Node Version Manager (nvm)
brew install nvm

# run the command for next steps to finish the install
brew info nvm
```

## IBM Developer Cloud Native Summit

> From
> {% user maxkatz %} 

*For a longer version of this entry check out Max's [blog post](https://maxkatz.org/2020/10/14/cloud-native-developer-summit-video-replay/)*

[Julia Nash](https://dev.to/nimicent) and [Upkar Lidder](https://dev.to/lidderupk) hosted a half-day livestream that focused on Cloud Native technologies this Tuesday.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0n8ljhw6tclvauabeyj4.png)

In case you missed the live event you can watch the replay on [Crowdcast.io](https://www.crowdcast.io/e/cloud-native-dev-summit).