Browsed by
Tag: 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!

Windows and Linux can work together. How to execute a Linux command from Visual Basic?

Windows and Linux can work together. How to execute a Linux command from Visual Basic?

Hi everyone,

In this post, I’d like to show you how easy it is to connect your Windows software to linux commands and software.

As you may know, Windows now includes the Windows Subsystem for Linux (WSL), which allows you to run a bash terminal and execute linux utilites as well as install software from the repository. Now, this is not virtualized. Rather, it uses a compatibility layer which allows it to execute linux tools on Windows.

This is not installed by default but can be installed by going into Control Panel, click on Turn Windows features on or off:

WSL VB.NET Tutorial - Steemit Followers - 1

You then select and install WLS:

WSL VB.NET Tutorial - Steemit Followers - 2

It may ask for a restart, and once it’s done, you simply launch bash.exe:

WSL VB.NET Tutorial - Steemit Followers - 3

Which will present you with the terminal:

WSL VB.NET Tutorial - Steemit Followers - 4

Perfect

But now, let’s say you want to automate something, and you are an expert using Visual Basic.NET or C#, and there’s this tool or script that runs on Linux that you want to execute. Can it be done? Sure it can!

From the CMD (Command Prompt), you can also launch a linux tool by simply invoking bash -c the tool to use. For example, if I’d like to launch python3, I would just use bash -c python3:

WSL VB.NET Tutorial - Steemit Followers - 5

When I hit Enter, I’ll go into Python running on a bash terminal but it’s redirected into CMD. This basically allows us to interact with Linux from the Windows Command Prompt:

WSL VB.NET Tutorial - Steemit Followers - 6

Interesting, right?

Then, how do you launch a linux script, tool, software, etc, from a VB.NET app?
EASY! Basically, we will use ProcessStartInfo, launch bash.exe and pass the -c parameter followed by what we want to run.

Here, let’s make a mini tutorial based on my script to get my Steem Followers:

This is the Python script I made that interacts with the Piston lib to get my follower count:

WSL VB.NET Tutorial - Steemit Followers - 7

To use it, I have to launch the script along with the username of the account I’d like to know the followers. That’s what I’ll show in this mini tutorial.

We will be using Microsoft’s Visual Studio 2017.

First: Let’s create a new project in Visual Studio. This project will be a Windows Forms App in the Visual Basic language. I’ve named it SteemGetFollowers (This project will be uploaded into GitHub. See the end of this post for links):

WSL VB.NET Tutorial - Steemit Followers - 8

Once we create the project, we will see an empty form:

WSL VB.NET Tutorial - Steemit Followers - 9

From the Toolbox, we will add a TextBox and a Button. The TextBox is for us to enter our Steem username, and the button will be to call the script and show our follower number in a MessageBox or MsgBox (Both do the same):

WSL VB.NET Tutorial - Steemit Followers - 10

Let’s make it look like this:

WSL VB.NET Tutorial - Steemit Followers - 11

We’ll change the Button1 name to Get Follower Count!. For this, click the button, and change the Text property:

WSL VB.NET Tutorial - Steemit Followers - 12

We can also change the Form1 name to something better. We’ll do the steps like the button, but instead clicking on the Form:

WSL VB.NET Tutorial - Steemit Followers - 13

Now, we have our form complete.

Next step?

We have to make sure our software compiles as x64. For this, we’ll select where it says Any CPU at the right of Debug and we’ll click on Configuration Manager:

WSL VB.NET Tutorial - Steemit Followers - 14

Here, we’ll select <New…>:

WSL VB.NET Tutorial - Steemit Followers - 15

Make sure it says x64 and press OK:

WSL VB.NET Tutorial - Steemit Followers - 16

Now, the Active Platform will change to x64. We can now Close the window:

WSL VB.NET Tutorial - Steemit Followers - 17

If you haven’t done so, save the project by clicking on the Floppy icon:

WSL VB.NET Tutorial - Steemit Followers - 18
WSL VB.NET Tutorial - Steemit Followers - 19

Once done, we’ll go to the project folder, which, if saved on the default path, should be in Documents\Visual Studio 2017\Projects\SteemGetFollowers\SteemGetFollowers\bin\x64\Debug. There, we will copy the script file, because when we build the software, it will find the script to launch in this folder:

WSL VB.NET Tutorial - Steemit Followers - 20

We have configure our project now! Let’s write code!

Now, let’s write the code. Double click on the Button and we should be directed to a pre-made code:

WSL VB.NET Tutorial - Steemit Followers - 21

Inside the Private Sub that it made, we will write a code to launch bash along with python and the script. For this, we will use ProcessStartInfo:

WSL VB.NET Tutorial - Steemit Followers - 22

Now, we simply show a simple message with the follower number using MsgBox:

WSL VB.NET Tutorial - Steemit Followers - 22.5

So, our code should look like this:

WSL VB.NET Tutorial - Steemit Followers - 23

We’re done!

Now, we will press the Start button to test our software:

WSL VB.NET Tutorial - Steemit Followers - 24

It should compile pretty fast, and once the software lauches, we will write our Steem Username in the TextBox and press the Get Follower Count! button:

WSL VB.NET Tutorial - Steemit Followers - 25

The result will be:

WSL VB.NET Tutorial - Steemit Followers - 26

And that’s it!

We have successfully written a software that interacts with the Linux bash terminal! This way, we can build awesome Windows software that interacts with our Python scripts inside Linux.

Note that when we compile the software, we will see the executables in the folder where we copied the Python script:

WSL VB.NET Tutorial - Steemit Followers - 27

The Python script file should be in the same folder as the executable for it to work. Also, the software must be compiled as 64bit or it will not find the bash executable.

GitHub Links:

You can get this project and check it out for yourself by going to the following repo:
https://github.com/moisespr123/SteemGetFollowers

Here, you can find the Python script:
https://github.com/moisespr123/SteemGetFollowers/blob/master/SteemGetFollowers/getFollowersCount.py

Hope you enjoyed this tutorial!!

Shall you have any questions, feel free to leave me a comment!

How to use ThrottleStop after Windows 10 Insider Build 16273?

How to use ThrottleStop after Windows 10 Insider Build 16273?

Hi everyone,

If you use ThrottleStop, you know how wonderful the software is. I personally use it to disable the BD PROCHOT option because my laptop would throttle the CPU when it gets hot and downclock it from 2.40Ghz to just 0.77Ghz. That also means I don’t experience Turbo Boost frequencies with my laptop unless I use ThrottleStop to disable the BD PROCHOT option.

So, what’s BD PROCHOT?

It means Bi-Directional Processor Hot, and it gets triggered when the CPU and GPU get hot, therefore triggering the CPU throttling to maintain the CPU temperature at an acceptable range. Normally, it is at 70 degrees Celcius in my laptop, but the CPU can reach up to 100 degrees Celcius since that’s the Thermal Junction limit.

ThrottleStop Windows Insider - 1
PROCHOT activated. CPU downclocks to maintain a temperature of some 70 Degrees Celcius.
ThrottleStop Windows Insider - 2
With BD PROCHOT deactivated in the software, the CPU makes use of the Turbo Boost frequencies and maintains the temperature just below 100 degrees Celcius.
ThrottleStop Windows Insider - 3
You can see how the CPU is some Mhz faster here, and how the GPU is actively running at 100% (BOINC crunching)
ThrottleStop Windows Insider - 4
If we don’t use Throttlestop to disable the BD PROCHOT option, we can see how our CPU throttles down to 0.77Ghz normally

The problem

It seems that the latest Windows 10 Insider Builds changed something in the kernel that prevents ThrottleStop from running. Some says that this is due to Microsoft having blocked some calls and that prevents it from running. Read more about that situation starting from this forum post.

The problem normally is that you get the following error when launching the software on builds 16273 and beyond (It still happens as of the 16281 build):

ThrottleStop Windows Insider - 5

The solution

After reading the forum, this user said that he got ThrottleStop running by running first a software called Open Hardware Monitor and after running it, to try to launch ThrottleStop. And Violá! It worked! So now, I can finally disable the BD PROCHOT option on my laptop and use my CPU to the max along with the GPU:

ThrottleStop Windows Insider - 6

And now, I can continue crunching BOINC tasks and make the most out of my CPU:

ThrottleStop Windows Insider - 7

Yay!

Read more on The ThrottleStop Guide over here.