If you have been working on a feature branch for an extended period of time and would like to get new work from the main branch brought into your feature branch, use the following method to prevent merge conflicts and simplify the timeline. Now … [Read more]
Setup a CUPS Print Server on Ubuntu
I have a Brother LaserJet printer that I would like to share over the home network. By setting up CUPS we can make this printer available to all the laptops, iPad, and iPhone in the house. 1) Setup Cups Modify the 3 highlighted lines above … [Read more]
Build a Raspberry Pi4 NAS Server with Ubuntu
I wanted to build a silent NAS server out of a Raspberry Pi and a USB 3 hard drive enclosure. I already build one in the previous article out of an old Celeron PC that was gifted to me. While the pc is a faster server in every way, I wanted something … [Read more]
Best Affordable DIY NAS with Btrfs Raid1 on Ubuntu Server
If you have an old PC laying around, you could setup a simple and affordable NAS (Network Attached Storage) to hold your precious data with functionality equivalent to expensive standalone NAS devices. You will need 2 similar sized hard disks to … [Read more]
List all globally installed npm packages
npm list -g --depth 0 You may have installed CLI tools globally in the past. This command (listed above) will show what you have installed. The new trend is to install cli locally so it is always up to date with each project. … [Read more]
Merge multiple git commits into one
Merging multiple commits into one is called "squashing" in Git. If you have a number of commits you recently made but wish to squash them into one clean commit, use this command: If done from the command prompt, you will be brought into VI … [Read more]
Javascript .foreach .map .filter functions
.foreach Applies a function to each item in the array .map Applies a function to each item in the array -and then creates a new array with the results of applying the function to each value .filter Same as .map but this is a test function, if it … [Read more]
Javascript Arrow functions
Ive had a hard time adjusting to arrow functions for some reason. If you remember input => output, that should make it click for you. Just remember: Why dont you check out .map .filter and .foreach next? … [Read more]
The best way to inject scripts in a page for faster performance
Bad Blocking Script Good Async Inline Script The bad example above blocks DOM construction. The good example above doesn't block the rest of the site's content from downloading BUT executes only after CSSOM construction and thus.. only … [Read more]
Modules load other modules – Angular
Angular apps are organized into modules. You will need to have modules load other modules. Here is the simple setup for a MasterModule to load one or more SubModules. … [Read more]