Post Image

Python - Working With Class Attributes

Posted at 10:12 PM on 10-09-2018

In this post I will be showing you how to add, remove, and check for class attributes in Python. Base Code For this article I will be using the class below as our class we are going to be adding and removing attributes from. Taking a quick look through this code we can see that it has 2 string att...

Post Image

JavaScript - Make Element Hidden

Posted at 11:56 PM on 10-19-2018

When creating web pages it is often helpful in your design to add an element of the page hidden and reveal it when a button is clicked or some other event happens. In this post I am going to be showing you in a very simple example how to take an HTML element and toggle it between hidden and not h...

Post Image

Python - Basic Web Server

Posted at 3:01 PM on 10-27-2018

If you need to fire up a web server to serve some files but installing apache or nginx is overkill using a simple script to serve your files is arguably one of the best ways to do it. In this post I have a simple python script that will serve a directory of files on your system via HTTP. I typica...

Post Image

Python - Sort List of Dictionaries

Posted at 1:32 PM on 05-22-2019

I often find myself with a list of dictionaries and I will need to sort them by a specific key contained in all of the dictionaries. The purpose of this post is to show a quick and easy way to sort a list of dictionaries. Below is the code to accomplish this. And if we run this code we get the outp...

Post Image

Cisco 9300 - Upgrade Firmware

Posted at 12:43 AM on 06-06-2019

In this post I will be showing you the upgrade/downgrade process for the Cisco Catalyst 9300. In this example I will be using a 4 switch stack which currently has the same firmware running on each of the switches and is already stacked. Getting Software on the Switch In my experience I have found t...

Post Image

Python - Enumerate Stop Using Counter Variables

Posted at 2:56 PM on 06-26-2019

Often times when iterating over a list or other iterable in a for loop you will need to keep track of what element you are on. If you have never been exposed to the builtin function you may solve that problem by creating a counter variable and incrementing that counter at the end of your loop. Below...