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.
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 which allow access to the CUPS web gui from locations […]
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 editor to pick which commits you want. Change the word “pick” […]
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 passed, it goes into the ‘collection’ or […]
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?
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 starts loading our widget scripts very late. Better Async Script Further Reading www.igvita.com/2014/05/20/script-injected-async-scripts-considered-harmful/ stackoverflow.com/questions/6963779/whats-the-name-of-google-analytics-async-design-pattern-and-where-is-it-used
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.
Javascript Promises
Work in progress. For now its just a collection of notes until I can assemble this into a tutorial. -use to react to eventual result of async action -use .then method -three states: succcess, rejected, pending
Switching to a VPS from Shared Hosting and LetsEncrypt SSL
Today I am switching from using shared hosting, over to VPS hosting. I figure one of the lowest tiers of either Digital Ocean or Vultr should be suitable for my low traffic sites. The process took two days of fiddling but I finally got it up and running properly. The finally process is described […]
How to Speed Up WordPress
If you are hosting your WordPress blog on a cheap shared hosting plan like GoDaddy or Hostgator, then you should setup these basic optimisations to really get the fastest speed you can. This is important for google SEO ranking, as site loading times are considered important ranking factors. 1. How to pick a good shared […]