Skip to content

Instantly share code, notes, and snippets.

View willianfalbo's full-sized avatar
🎧
Coding for fun!

Willian Falbo willianfalbo

🎧
Coding for fun!
View GitHub Profile
@willianfalbo
willianfalbo / README.md
Last active March 6, 2023 17:02
Delete node_modules folder recursively from a specified path using command line

Print out a list of directories to be deleted:

find . -name 'node_modules' -type d -prune

Delete directories from the current working directory:

find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' +
@willianfalbo
willianfalbo / README.md
Last active February 26, 2023 06:43
Homebrew Apps - Essentials for reset factory on MacOS

Homebrew Apps

Essentials apps after reset factory on MacOS

Requirements

  • Install NVM before running the scripts below.

NVM is a node version manager

How to debug Unit Tests (Jest)

In your VSCode, make sure your .vscode/launch.json file has the following configuration:

{
  "version": "0.2.0",
  "configurations": [
    {
 "type": "node",
@willianfalbo
willianfalbo / README.md
Last active May 5, 2021 03:50
Docker compose with multiple databases

Docker compose with multiple databases

It works for Linux and macOS.

version: "3"

services:

  mongodb:
@willianfalbo
willianfalbo / README.md
Last active October 8, 2020 18:54
How to get a mongo shell running into the docker container

How to get a mongo shell running into the docker container

We can run the interactive shell by running the following command:

docker container exec -it MyContainerName bash

Note: From this command, you will be able to get a bash shell running into the cointainer.

Then, we must get the mongo shell as admin. Otherwise, you will not be able to see the databases and collections.

Run mongo -u "USERNAME" -p "PASSWORD" HOSTIP --authenticationDatabase "admin"

@willianfalbo
willianfalbo / README.md
Last active April 19, 2024 01:13
Install Zsh, Oh-My-Zsh, Fonts-Powerline & Plugins (Ubuntu 18.04+)

Install Zsh, Oh-My-Zsh, Fonts-Powerline & Plugins (Ubuntu 18.04+, MacOS)

Introduction

After following these steps, your terminal will look like:

1. Install Zsh

Zsh is a shell designed for interactive use, although it is also a powerful scripting language.

@willianfalbo
willianfalbo / README.md
Last active April 18, 2024 13:22
Expanding disk inside Hyper-V using Linux Virtual Machine (Ubuntu)

Expanding disk inside Hyper-V using Linux Virtual Machine (Ubuntu)

  1. Turn off your virtual machine

  2. Go to Settings > SCSI Controller > Hard Drive. In the Media section, edit the Virtual Hard Disk and expand to desired space

  3. Start the virtual machine and connect to it

  4. Install the GParted by running the command sudo apt install gparted

@willianfalbo
willianfalbo / README.md
Created June 5, 2020 20:55
Enable Enhanced Session Mode in Hyper-V Virtual Machine (VM)

How to enable enhanced session mode in Hyper-V Virtual Machine (VM)

  1. Turn Off your virtual machine and run the command on the physical Hyper-V host:

Set-VM -VMName "Your VM Name" -EnhancedSessionTransportType HvSocket

  1. Start the virtual machine.
@willianfalbo
willianfalbo / README.md
Last active April 2, 2022 13:09
Enable Sound Device on Ubuntu 18.04 using Hyper-V Virtual Machine (VM)

xRDP – How to redirect Sound on Ubuntu 18.04

Please follow this tutorial link

Short version is below in case link goes dead.

apt install xrdp-pulseaudio-installer
xrdp-build-pulse-modules
sudo apt-get install xrdp-pulseaudio-installer -y
@willianfalbo
willianfalbo / README.md
Last active July 31, 2020 18:11
Enable Virtualization in Hyper-V Virtual Machine (VM)

Run Hyper-V in a Virtual Machine with Nested Virtualization

  1. Turn Off your virtual machine and run the command on the physical Hyper-V host:

Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true

  1. Start the virtual machine.

Reference: Run Hyper-V in a Virtual Machine with Nested Virtualization