addalias script

#!/bin/bash # Set in .bash_aliases with: alias addalias='~/alias.sh' # Ask the user for the alias name they want to use echo "Enter the alias name:" read user_alias # Replace the alias_name variable in the alias command with the user's input alias_…

LSN #11 What Is the DOM?

The DOM (Document Object Model) is a tree-like structure that your browser builds when it reads an HTML page. It represents everything on the page in a way that JavaScript can understand and interact with. So when your browser loads this HTML: <html> <body> <h1&…

LSN #10 Linux Port Collisions

Two Services Want Port: 80, so what are some tools to help identify who's hogging it? # listen open files using port 80 sudo lsof -i :80 # a modern netstat ss -tulnp…

LSN #9 GIT Revert & HEAD

A destructive and non-destructive way to roll back a commit would be using: #DESTRUCTUVE HEAD~1 refering to the commit before the current one git reset --hard HEAD~1 #NON-DESTRUCTIVE new commit that undoes the changes of the most recent commit git revert HEAD…

LSN #8 OpenSCAD Toolbox Labels

With the help of someone online, I was able to generate 90% complete toolbox label for 3D printing using OpenSCAD. Being able to generate your 3D model in code makes for easy repetition. $fn = 64; outline(0.5) text("Spencer", font = "Serpentine"); module outline(border) { bridging…

LSN #5 Awk has Power

Sometimes it's easy to forget the power of awk. When faced with a task, it's often easy to resort to writing a program or script. This isn't a bad thing, but realizing some tasks can be handled with awk, could save you time. Awk…

LSN #7 grep to search through directories

This post will be quick, but I still wanted to write this one regarding grep. Most times I see grep being used after a pipe to find or sort output and rarely as a starting command. One of my favorite abilities of grep is that it can recursively search through…