Tech Junkie Blog - Real World Tutorials, Happy Coding!: June 2021

Monday, June 14, 2021

 Now that we have a static IP setup for our network.  We want to use it as a DNS server.  Let's go over the steps again for configuring a DNS server and make sure that eveything works with the static IP.  The key is the make it work on reboot.

Before you do anything get the name of you network adaptor and the IP address for it, my network adapter is enp0s3 and my IP address is  Yours will be different

You also want to know the hostname of the server for the configuration, you can find out what the hostname is by typing hostname

If you want to change your hostname you can follow the instructions on this post 

Make sure you have the following information in the /etc/named.conf file

Friday, June 11, 2021

By using @font-face declaration you can use custom fonts in your web pages.  The way this works is that you can host the fonts on your server, and then the user agent will download the font for future renders, for example you can specify the following markup to use a custom font that's not widely available.

    font-family: "Verana";
    src: url("Verana-Regular.otf");

You can get the free fonts here at Arkandis Digital Foundry to play around with custom fonts.
The url can be a local resource within the local server, or a remote resource on the internet.

Thursday, June 10, 2021

Views are virtual tables that you can create that others can use without knowing the complexity of the query, but can be used like a table. Also they can provided an added security by giving developers access to a view instead of the underlying table. Views does not contain data in itself the data stays at the tables that the views are created from. Complex views can degrade performance since they contain no data the query must be processed every time. Let's say a junior developer just came on board and he doesn't really know SQL that well. You can create a view of the more complex views to work with until he gets better with his SQL.

CREATE VIEW EmployeeTerritoriesDescriptions AS
SELECT e.FirstName + ' ' + e.LastName AS Name, t.TerritoryDescription,t.TerritoryID
FROM Employees e
INNER JOIN EmployeeTerritories et ON et.EmployeeID = e.EmployeeID
INNER JOIN Territories t ON t.TerritoryID = et.TerritoryID

The view above queries the employees territories using joins, by creating a view the person using the view does not have to know the underlying table structures that is in the database they can just use the view.

Wednesday, June 9, 2021

Docker is the hottest infrastructure technology to hit the tech world in a long time.  The appeal of Docker is that it allows the infrastructure team to utilize the capacity of the servers to near full capacity.  Docker is a container.  A container is like a micro virtualization minus the operating system.  It only contains enough infrastructure to host an app, without the fat.  Hence the term container is used to describe it.

Tuesday, June 8, 2021

The first thing we want to do is set up the Google Chrome browser on a Linux instance, I've decided to use a virtualized Fedora workstation as my development machine.  You can use Windows if you want, it would be a lot easier.  It doesn't really matter because Asp.Net Core works on Linux as well.  Google Chrome has the best development tools and it also has an extension call Postman.  Although you want to install the standalone version of Postman.  Here are the steps to install Google Chrome on Linux

I wrote a post on how to set Fedora as your development machine here

1. Navigate to the URL

2. Click on "Download Chrome"

Google chrome download page

Monday, June 7, 2021

 In the previous post we configured a DNS server, in this post we are going to assign a static IP to that server so that we don't get a new IP everytime we reboot the server.

First let's check our VirtualBox Adapter IP settings

1. Make sure your VM is set to the Bridge Network setting

Now turn on the VM machine and type ifconfig to the the adapter name

First let's get our network information with the command ifconfig 

Sunday, June 6, 2021

In the previous post we installed MongoDB on a Linux orperating system.  On this post we are going to setup the data folder that MongoDB needs and connect to MongoDB in the command line. 

Here are the steps:

  1.  Create a folder call /data/ then create another folder call db underneath it with the mkdir command, I've already created the folder so I can't do it on the command prompt again.
           But you basically run the following commands
               1.  mkdir /data
                2. mkdir /data/db

    2.  Now we want to start the MongoDB service with the command mongod --dbpath "/data/db"

    You only have to do this once, afterward you can just type mongod and the service should start.           You would need sudo rights to run these commands.

3. Now you can connect to you MongoDB instance with the mongo command

Saturday, June 5, 2021

One of the more useful things are about yum is that it comes with a group install feature.  This basically lets you install groups of packages with one command.  These includes, administration tools, storage, databases, virtualization, and etc.

Friday, June 4, 2021

A big part of web development is dealing with the DOM (Document Object Model) the DOM is organized in a hierarchical order.  You locate an element in the DOM by traversing through the DOM tree.  For instance if you have an ordered list there's a natural hierarchical order to it.

Let's say you have the following markup

  <li>item 1</li>
          <li>sub item 1</li>
          <li>sub item 2</li>
          <li>sub item 3</li>
  <li>item 2</li>
  <li>item 3</li>

Thursday, June 3, 2021

RIGHT JOIN works like the INNER JOIN, it just returns all the records that are on the right side of the = sign on the RIGHT JOIN clause. For example let's say you want to get a record of all customers who orders a certain product.

Wednesday, June 2, 2021

In this blog we are going to start our journey into AWS infrastructure with the creation of an EC2 instance which is probably the most common task you'll ever do. 

 Here are the steps to create an EC2 instance on AWS:

1. Log into AWS and on the "Find Services" search box type EC2 and press enter 

2. You will be taken to EC2 screen, then click on "Instances"
AWS EC2 Dashboard Screen

2. Click on "Launch Instance"

Launch AWS EC2 Instance

Tuesday, June 1, 2021

 In the next month or so I will start a series of blog posts that will take you from scratch on how to deploy an Angular application that makes API calls from an Asp.Net Core web api backend using Entity Framework Core as it's ORM and MySQL as the database.  Most tutorials would end there, but I will take it further and deploy the application on AWS so that it lives on the world wide web.  Since I don't want to start from scratch I will be modernizing the ACME bank application that I've started with AngularJS.  If you are working with AngularJS you know that it's time to update and upgrade because it's at its' last legs and Angular is the future.  Some say the journey is more rewarding than the destination.  I hope, you will join me on this journey.  Thank you, here is a diagram of what's to come

Search This Blog