Browsed by
Category: Tutorial

Installing Node.js 10.x on Ubuntu Focal (20.04) before the official release

Installing Node.js 10.x on Ubuntu Focal (20.04) before the official release

Hi everyone,

Today, I’ll guide you through the steps of installing Node.js 10.x on Ubuntu Focal (20.04) which is stated to be officially released on April 23, 2020.

Right now, installing Node.js using the NodeSource Node.js official repositories do not work because they do not support unreleased versions of Ubuntu.

You may think of using a previous Ubuntu repository in order to install Node.js, but this will actually not work. This is because Ubuntu 20.04 renamed the Python 2 packages from python to python2.

Trying to install Node.js using the NodeSource repositories

The easiest way to normally install Node.js 10.x is by using the official NodeSource repository. For this, we follow their steps.

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash

The problem is that because the OS hasn’t been officially released, we get the following issue:

NodeJS script failing on Ubuntu Focal 20.04

No problem. Let’s move to the manual installation method:

  1. Add the NodeSource package signing key:
    curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
  2. Set the version to node_10.x:
    VERSION=node_10.x
  3. Let’s set the distro to eoan, the current stable Ubuntu version:
    DISTRO="eoan"
  4. Now, we need to add the repository to our Linux installation:
    echo "deb https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee /etc/apt/sources.list.d/nodesource.list
    echo "deb-src https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list
  5. The commands should like this in the terminal:
    NodeJS Manual installation commands
  6. We can now run sudo apt update to update the repository information:
    NodeJS manual installation apt update
  7. We will now attempt to install the nodejs package by running sudo apt install nodejs:
    NodeJS installing nodejs fails

As you can see above, following the manual installation steps fails as well because there is no python-minimal package in Ubuntu 20.04. To solve this, we will manually download the Node.js Debian package and modify it to have it refer to python2-minimal instead of python-minimal.

Manually downloading, modifying and installing Node.js 10.x

  1. We will manually navigate to the repository to download the file here: https://deb.nodesource.com/node_10.x/pool/main/n/nodejs/
    NodeJS HTTP repo
  2. From there, just copy the desired Node.js package link to the clipboard. Then, use wget to download it on the terminal. I recommend downloading it to a clean directory since we will run some commands to extract and perform some modifications to it:
    Downloading the NodeJS debian package
  3. Once the download finishes, we need to extract the downloaded debian package with the ar utility:
    ar x nodejs_10.19.0-1nodesource1_amd64.deb
    extracting the NodeJS debian package
  4. We need to extract the control.tar.gz file:
    tar -xzf control.tar.gz
    Extracting control.tar.gz
  5. Using nano or your favorite text editor, we will edit the control file. Look for python-minimal:
    nano control
    Editing the control file
  6. Change python-minimal to python2-minimal:
    Renaming python-minimal to python2-minimal
  7. Save the file. On nano, press CTRL + O, then exit pressing CTRL + X.
  8. We now need to recreate the control.tar.gz tar package to include the modified control file. To do this, we will run the following command:
    tar -czf control.tar.gz control md5sums postinst pr einst prerm
    Recreating the control.tar.gz file
  9. Finally, we will replace the control.tar.gz in the debian package file. We will run the following command to do so:
    ar -r nodejs_10.19.0-1nodesource1_amd64.deb control.tar.gz
    Replacing the control.tar.gz in the NodeJS debian package
  10. We can now install the package with dpkg. We’ll run the following:
    sudo dpkg -i nodejs_10.19.0-1nodesource1_amd64.deb
    Installing the modified NodeJS debian package

After following the above steps, we should have Node.js installed on our operating system. We can confirm this by running node -v and npm -v:

Checking NodeJS and npm versions

And that’s it! We have successfully installed Node.js on our Ubuntu Focal installation.

Downloading ffmpeg for SVT-AV1 GUI

Downloading ffmpeg for SVT-AV1 GUI

Hi everyone,

In this post, I’ll show you how to download ffmpeg to use with SVT-AV1 GUI. FFmpeg is required to extract the video file to .y4m, encode the audio to Opus, and merge both files when the encode is finished.

Here are the steps:

1. Navigate to https://ffmpeg.zeranoe.com/builds/:

Step 1
Step 1

2. Select the nightly build which is the first one shown in “Version”. Select the 64-bit Windows version if you have a 64-bit machine, and select “Static” in the Linking column. Then, click on “Download Build”:

Step 2
Step 2

3. Click on the downloaded file:

Step 3
Step 3

4. Go to the “ffmpeg” folder, and then to the “bin” folder. You should see “ffmpeg.exe” inside:

Step 4
Step 4

5. Extract it and place it in the location where you have SVT-AV1 GUI:

Step 5
Step 5

That’s it! Enjoy!

Downloading ffmpeg for Audio MD5 Checker

Downloading ffmpeg for Audio MD5 Checker

Hi everyone,

In this post, I’ll show you how to download ffmpeg to use with Audio MD5 Checker. FFmpeg is required to calculate MD5 audio hashes with Audio MD5 Checker.

Here are the steps:

1. Navigate to https://ffmpeg.zeranoe.com/builds/

Step 1
Step 1

2. Select the nightly build which is the first one shown in “Version”. Select the 64-bit Windows version if you have a 64-bit machine, and select “Static” in the Linking column. Then, click on “Download Build”:

Step 2
Step 2

3. Click on the downloaded file:

Step 3
Step 3

4. Go to the “ffmpeg” folder, and then to the “bin” folder. You should see “ffmpeg.exe” inside:

Step 4
Step 4

5. Extract it and place it in the location where you have Audio MD5 Checker:

Step 5
Step 5

That’s it!

Enjoy!

Downloading ffmpeg for rav1e GUI

Downloading ffmpeg for rav1e GUI

Hi everyone,

Today, I’ll show you the steps to download ffmpeg for the rav1e_gui encoding tool, which requires this to pre-process and post-process video files when encoding them to the new AV1 video format.

Below are the steps:

1. Navigate to https://ffmpeg.zeranoe.com/builds/

ffmpeg Step 1

2. Select the nightly build which is the first one shown in “Version”. Select the 64-bit Windows version if you have a 64-bit machine, and select “Static” in the Linking column. Then, click on “Download Build”:

ffmpeg general step 2

3. Press “Save”:

ffmpeg general step 3

4. When the download finishes, press “Open”:

ffmpeg general step 4

5. Go to the ffmpeg folder:

ffmpeg general step 5

6. Go to the “bin” folder:

ffmpeg general step 6

7. Copy the “ffmpeg.exe” executable:

ffmpeg general step 7

8. Past the “ffmpeg.exe” executable in the location where you extracted rav1e_gui:

rav1e ffmpeg

9. That’s it!

Enjoy!

Downloading ffmpeg (General instructions)

Downloading ffmpeg (General instructions)

Hi everyone,

Today, I’ll show you the steps to download ffmpeg in your Windows machine. This is needed for tools like rav1e_gui, which uses ffmpeg to pre-process and post-process video files when encoding them to the new AV1 video format.

Below are the steps:

1. Navigate to https://ffmpeg.zeranoe.com/builds/

ffmpeg Step 1
ffmpeg Step 1

2. Select the nightly build which is the first one shown in “Version”. Select the 64-bit Windows version if you have a 64-bit machine, and select “Static” in the Linking column. Then, click on “Download Build”:

ffmpeg step 2
ffmpeg step 2

3. Press “Save”:

ffmpeg step 3
ffmpeg step 3

4. When the download finishes, press “Open”:

ffmpeg step 4
ffmpeg step 4

5. Go to the ffmpeg folder:

ffmpeg step 5
ffmpeg step 5

6. Go to the “bin” folder:

ffmpeg step 6
ffmpeg step 6

7. Extract the “ffmpeg.exe” executable to your preferred location:

ffmpeg step 7
ffmpeg step 7

8. That’s it!

Enjoy!

Installing Rust on Windows

Installing Rust on Windows

Hi everyone,

Today, I’ll show you how to install Rust on Windows. The steps are very easy!

1. First, navigate to https://rustup.rs/:

Rust Windows 1

2. Click the “rustup-init.exe” link and save the installer:

Rust windows 2

3. Click “Run”:

Rust Windows 3

4. You’ll be presented a Command-Line window. Type “1” and press enter:

Rust Windows 4

5. Installation will begin:

Rust Windows 5

6. If everything runs as it should, you should see the following:

Rust Windows 7

That’s it! Rust is installed!

How to enable RPC in your Gridcoin Wallet?

How to enable RPC in your Gridcoin Wallet?

Hi everyone,

Today, I want to tell you how to enable Gridcoin’s RPC protocol to use apps like Gridcoin Remote on Android phones. This allows you to check stuff like your Gridcoin balance, magnitude, CPID, and more!

Here’s how you can enable it. There are 2 options:

Option 1: Gridcoin Remote Configuration Tool for Windows

GRC Remote

Download the Gridcoin Remote Configuration Tool for Windows available in Github. This tool will let you specify the IP Addresses allowed to connect, the Port Number, Username and Password, and it also has a tick box in case you decide to disable RPC access.

You can download this tool on GitHub: https://github.com/moisesmcardona/GridcoinRemoteConfigurationTool/releases

Option 2: Edit gridcoinresearch.conf manually

To edit the gridcoinresearch.conf manually you’ll need to locate that file. It is usually stored in “C:\Users\Your Username\AppData\Roaming\GridcoinResearch”, where “Your Username” is your Windows account folder.
Once you find the gridcoinresearch.conf file, open it in your favorite text editor.

You’ll need to add or edit the following lines:

server=1
rpcallowip=
rpcport=
rpcuser=yourusername
rpcpassword=yourpassword

Change the values after the = to the values you’d like to use. An example of how the lines should look are below:

server=1
rpcallowip=192.168.1.*
rpcport=9332
rpcuser=myusername
rpcpassword=mypassword

Now, save your config file and restart the Gridcoin Wallet. Once it loads, you can connect to it by using the Gridcoin Remote app.

Please be careful with RPC. Not only will Gridcoin Remote work, but anyone with additional knowledge may control your wallet. This is why it’s recommended to only allow IP Addresses you trust, and be careful if you expose the port to the public in your router’s port forwarding page. It’s better if you use an internal VPN. DD-WRT provides such simple VPN that you can connect to and use Gridcoin’s RPC functionality while away. This way, you don’t need to expose the port to the public.

Hope these steps were useful!

Rip your Audio CD to Opus using my latest opusenc.exe build with Exact Audio Copy

Rip your Audio CD to Opus using my latest opusenc.exe build with Exact Audio Copy

Hi everyone,

Today, I’d like to show you the steps to rip your Audio CD to Opus using Exact Audio Copy and my latest opusenc.exe build.

Why use my opusenc.exe build?

  1. First, it includes the newly added –tracknumber argument which enables you to easily pass the track number to the opus file.
  2. Second, it is not needed to specify the output filename, as it will use the same input name. For Exact Audio Copy, this means that you only need to add the source and not the destination.
  3. Third, it includes all of the latest commits performed to the opus, libopusenc, and opus-tools, so the build is up to date.

You can read more about the new features in opusenc.exe in yesterday’s post.

Please note that my build is only for 64bit systems. If you PC runs a 64-bit version of Windows, then you can proceed with these instructions.

Downloading opusenc.exe

You can download my latest build of opusenc.exe by clicking here. Then, you need to extract opusenc.exe to a location of your choice.

Setting up Exact Audio Copy

1. Launch Exact Audio Copy:

EAC Opus 1

2. Go to the “EAC” menú and select “Compression options”:

EAC Opus 2

3. Now, head to the “External Compression” tab if you’re not there:

EAC Opus 3

4. In “Parameter passing scheme:” select “User Defined Encoder”. Then, in “Use file extension”, write “.opus”:

EAC Opus 4

5. Next, browse for the opusenc.exe executable in the place where you extracted it:

EAC Opus 5

6. Next comes the command-line options. You’ll write the following line:

--music --bitrate 64 --artist "%artist%" --title "%title%" --album "%albumtitle%" --date "%year%" --genre "%genre%" --tracknumber %tracknr1% --comment "COMMENT=%comment%" %hascover%--picture "%coverfile%"%hascover% %source%
EAC Opus 6

7. Finally, press “OK”:

EAC Opus 7

You’re done!

With these easy steps, you’ll now be able to rip and encode your audio CD’s to the Free and Open Source Opus format!

Enjoy!

New Gridcoin BOINC Challenge: [email protected] – Installing VirtualBox and configuring the project

New Gridcoin BOINC Challenge: [email protected] – Installing VirtualBox and configuring the project

Hi everyone,

Today, a new BOINC challenge for the project [email protected] started. This challenge was issued by Team Gridcoin:

Cosmology@Home Challenge 1

I went ahead and added my machines to this project, only to realize I need VirtualBox installed:

BOINC Virtualbox not installed

So in order to crunch tasks for this project, I went to install VirtualBox as well as configure the project. Here I detail you the installation and optional configuration process, which is really simple:

Installing VirtualBox

1. First, we go to the VirtualBox Website, https://virtualbox.org and click the Download VirtualBox button:

Downloading Virtualbox 1

2. Because I’m using Windows, I’ll download the Windows version:

Downloading Virtualbox 2

3. We’ll click Save:

Downloading Virtualbox 3

4. And after the download finishes, we will click on Run:

Downloading Virtualbox 4

5. We press Next:

Installing Virtualbox 1

6. We’ll leave this as it is and press Next:

Installing Virtualbox 2

7. We’ll press Next again:

Installing Virtualbox 3

8. Now, we’ll click Yes:

Installing Virtualbox 4

9. Now on Install:

Installing Virtualbox 5

10. It will ask us to install some driver software. We’ll click Install:

Installing Virtualbox 6

11. When the installation finishes, uncheck the Start VirtualBox checkbox and press Finish:

Installing Virtualbox 7

Configuring the project

I recommend doing these steps if you have a really bad lag or unresponsiveness in your PC. I had to apply a customized version of the configuration posted in the [email protected] FAQ section as the VM would get stuck in my AMD Ryzen machine, so I configured it to use half the PC cores.

Here’s how to configure it:

1. Go to the [email protected] Limit CPU section in the FAQ and copy and paste the app_config.xml template:

Configuring Cosmology@Home 1

2. Open your favorite Text Editor and copy the contents you copied recently. I used Notepad++ here. Then, change the <avg_ncpus> section to specify the amount of threads you want the VM to use. I first limited it to 4 cores and kept going up until I could maximize my PC resources while keeping it stable. In my Intel machine, I tried this configuration to test it:

Configuring Cosmology@Home 2

3. Save the config in the [email protected] folder. If you installed BOINC and left the directories at their default location, then this directory/folder is C:\ProgramData\BOINC\projects\www.cosmologyathome.org. Save the file as app_config.xml:

Configuring Cosmology@Home 3

4. You’ll see the syntax is highlighted. It should be like this meaning it saved as an XML file:

Configuring Cosmology@Home 4

And that’s it! We’ve finished the configuration.

Testing the installation and configuration.

Now, we need to launch BOINC and perform a project update. For this, exit BOINC if it is already running and launch it again. Then select the [email protected] project and press Update:

Running Cosmology@Home 1

You should see in the log that it is downloading tasks:

Running Cosmology@Home 3

And that they are running:

Running Cosmology@Home 3

You can also check VirtualBox and see that the task VM is running:

Running Cosmology@Home 4

And here’s how the CPU of one of my Intel machines looks like:

CPU Threads used by Cosmology@Home

Eventually, I upped the CPU threads to 8 so that it can use every resource in it. The only exception is my AMD Ryzen 7 2700X machine which is limited to 8 threads out of its 16.

If you followed this guide and are running [email protected] tasks, congrats! And I wish you luck in the competition!

I’m at position #27 right now 😁:

Cosmology@Home Challenge Position 27

As a bonus, I made a section on my personal website where you can see the tasks I’ve finished processing:

BOINC Finished Tasks 1

This required some coding in my BOINCToWeb software I wrote to accomplish this. I’ll talk about the code changes and additions in another post.

I also remember all of you that you can see the tasks I’m crunching by clicking here:

BOINC Running Tasks

That’s all!

Preparing Dinner: Pork Chop

Preparing Dinner: Pork Chop

Pork Chops - Air Fryer - 1

Hi everyone,

In this post, I’ll show you how easy it is to prepare Pork Chops 😂

The first step is to defrost them:

Pork Chops - Air Fryer - 2

The second step is to season them:

Pork Chops - Air Fryer - 3

The third step is to put them in the Air Cooker:

Pork Chops - Air Fryer - 4

We will give them 10 minutes at 400 degrees. Once it finishes, we will turn them and give them another 10 minutes:

Pork Chops - Air Fryer - 5

Once it’s finished, they are ready to be eaten:

Pork Chops - Air Fryer - 6

Bonus:

Preparing fries: We simply put them in the air cooker and we give them 5 minutes at 400 degrees. Then, we turn them and give them another 5 minutes but we lower the temperature, so they will not get burned. This way, we eat more healthy since we are not frying them:

Air Frier - French Fries

The result is shown in the first picture of this post.

Bon Apetite!