Tech Junkie Blog - Real World Tutorials, Happy Coding!

Latest Posts

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 192.168.0.14.  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-face{
    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 https://www.google.com/chrome/

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

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

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.

Search This Blog