Wednesday, June 30, 2021
AWS has a very generous free tier account, but there will be times when you forget to clean up your work and are stuck with the bill. There's a setting in AWS that allows to set the limits on your account so that you won't get charged for resources or get a surprise on your bill.
Here are the steps to set a billing alarm:
1. First thing you have to do is sign in as the root user
Tuesday, June 29, 2021
In this post we are going to use the .NET Core CLI to create a web api application for our app. The first thing to do is create an a folder to hold our files. Since we are using Linux you want to sudo su into the terminal and create the following folder /opt/app/ACMEBank. Once that's done cd into it and you are ready to type in the command to create the Web Api.
Here are the steps:
1. What you want to do first is to make sure that you have .NET Core install by typing in dotnet --info, there should be information on your .NET Core install. If you don't have .NET install you can follow the directions in this post.
Monday, June 28, 2021
The dig and nslookup commands are useful commands that you can use to lookup information about a network. The dig command gives you more information about a network. For example for my network I have a DNS server setup in it, if I wanted to display the DNS information on my server I would simply type dig masterdns.acmebanking.com and I would get the following:
As you can see it gives you a lot of information about the DNS server like the IP that the server resolves to. However, there are times when you just want something quick and brief on what the IP resolves to. For example you might know the IP address but not the hostname or vice versa and you want to lookup the information on the part that is know that's when nslookup comes in handy. For example let's say you know the IP address 192.168.0.15 but you don't know the hostname. You can lookup the hostname by typing nslookup 192.168.0.15 and you would get the hostname that resolves to the IP address
Obviously you can get more information with the dig command but sometimes it's nice to get less information with the nslookup command. Although it is deprecated and might not be available for your Linux distribution. So if it's not available use the dig command instead.
Friday, June 25, 2021
Let's say we have a div with a font-size of 15px, and there's a span tag with a font-size of 2em. The span font-size of the span would be 30px, because the span is part of the div element.
Let's say have the following styles:
div {
font-size: 15px;
}
span {
font-size: 2em;
}
And with the following HTML markup:
<div>The font-size of the div element. <span>The span font-size</span>.</div>
The output is the following:
Thursday, June 24, 2021
SELECT COUNT(*) NumberOfProductsByCategory FROM Products GROUP BY CategoryID
The query above gives you the following results:

Wednesday, June 23, 2021
So far we have connected to our EC2 instance with the terminal on Linux and Putty on Windows. There is another option that you can perform and it only requires that you have a browser. You must have an Amazon Linux Version 2 instance for this to work, at least that's what I think.
On the instances page on the AWS console click on the "Connect" button while the instance is selected
Tuesday, June 22, 2021
The most important thing for most modern dynamic application these day is choosing a database to store your data. If you are on a Windows environment then you use SQL Server database that is a fine choice. But if you are on Linux MySQL is a great choice also. In this post we are going to go through how to install MySQL server on our Fedora development machine.
Here are the steps to install MySQL on Fedora Linux:
1. First we need to add the MySQL repository to our machine by tying in the following command in the terminal
sudo dnf -y install https://dev.mysql.com/get/mysql80-community-release-fc32-1.noarch
Monday, June 21, 2021
The chattr command in Linux is one of the more useful commands that you've probably used but have no idea what it's use is, it just works! That's probably the most dangerous phrase in IT. Well just from the command you can tell that controls the file modify attribute of the file. Well not really I mean how is chattr related to file attributes. I guess it's change attribute. It's pretty easy to use + means to add an attribute, - means to remove an attribute, and = means you want to assign an attribute. You can also add attributes with the -R option to reclusively on a directory.
One of the senario I used often is when I want to make a file immutable, I'll just type chattr +i filename. For instance if I and setting a DNS server and I don't want the DHCP scripts to change the resolv.conf file every time I restart the NetworkManager.service I would just type chattr +i /etc/resolv.conf to make the file immutable. If I try to modify the file I would get the following error message saying I can't modify the file.
It's just as easy to make it writable again, it would just be chattr -i /etc/resolv.conf
Friday, June 18, 2021
The values for widening and narrowing fonts are the following:
- normal
- ultra-condensed
- extra-condensed
- condensed
- semi-condensed
- semi-expanded
- expanded
- extra-expanded
- ultra-expanded
Thursday, June 17, 2021
Wednesday, June 16, 2021
On the previous post we connect to our EC2 instance using SSH on Linux now I will show you how to connect to the EC2 instance using Putty on Windows
Here are the steps to connect to our EC2 instance on Windows:
1. Download and install Putty from here
2. Open PuttyGen from the start menu, and select your .pem file and convert it to a .pkk file
Once it's open select "File", then "Load private key", then select your .pem file
Tuesday, June 15, 2021
In this post we going to get our development environment with NodeJS, VSCode and Postman
The Urls are the following, if you are developing in Linux you should install the Linux version. All these tools are cross platform so you can develop in either Windows, Linux or MacOS:
.NET Core: https://dotnet.microsoft.com/download
Node.JS: https://nodejs.org/en/
Visual Studio Code: https://code.visualstudio.com/#alt-downloads
Postman: https://www.postman.com/downloads/
For .NET Core make sure you download the "recommended" version and not the preview version. Also with NodeJS, usually it has LTS status.
Installing .NET Core SDK and NodeJS On Fedora
In order to install .NET Core SDK on Fedora open the terminal and type in the following
sudo dnf install dotnet-sdk-3.1 -y
The -y tells Fedora to skip the y/N prompt and just go on with the install
Once the SDK is installed you can verify the install with the command dotnet --version
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
@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
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
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"
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
Here are the steps:
- 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.
Saturday, June 5, 2021
Friday, June 4, 2021
Let's say you have the following markup
Thursday, June 3, 2021
Wednesday, June 2, 2021
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