Category Archives: Programming

How to install nodejs on Ubuntu

By | July 31, 2020

Nodejs is included in the Ubuntu repository by default. This means that if you run: sudo apt install nodejs your terminal screen will be swing into action downloading the current stable release of node. Currently it is v10.19.0. But what if you need another version? What if you need to guarantee a specific version? First… Read More »

How to remove Last Login in MacOS bash terminal

By | January 25, 2020

When you open terminal you’ll probably be greeted with: Last login: Sat Jan 25 07:54:26 on ttys001 /Users/sean> How to get rid of Last login or other Method Of The Day (MOTD) messages? It is a 2 second fix. Just type “touch .hushlogin”. Just the presence of this file will suffice.

Showing all tabs in sublime

By | December 16, 2019

Sublime is a great text editor. It is fast and powerful but there is one annoying default setting which is all the tabs do not show by default. Instead, they overflow on the right hand side where you have to click on the triangle/arrow to display the other tabs in order to navigate to it.… Read More »

Lite server Couldn’t open browser

By | February 9, 2019

If you are trying lite server and want to open up another browser using the bs-config.json file and you get the following error: “Couldn’t open browser (if you are using BrowserSync in a headless environment, you might want to set the open option to false)” you are probably using a config file of: { “port”:… Read More »

WTF is UTF?

By | December 27, 2018

UTF stands for Unicode Transformation Format. The most popular version is UTF-8 which represents 8 bits or 8 one’s or zero’s. (11111111 -> 00000000). The secret though is that it uses up to 4 bytes. We know that 1 byte = 8 bits so 4 bytes gives us 32 bits. 8 bits can represent 255… Read More »

What does > /dev/null 2>&1 mean?

By | December 15, 2018

Here is a great write up explain what the cryptic symbols mean. https://medium.com/@codenameyau/step-by-step-breakdown-of-dev-null-a0f516f53158 Combine this with command -v to bypass “normal function lookup” from https://askubuntu.com/questions/512770/what-is-use-of-command-command we can use this to check if certain applications exist.

pretty json format in Sublime in 60 seconds

By | October 9, 2018

If you are working with json and want to view it in a pretty format within Sublime, you can install an extension very quickly. The long way on a Mac is to navigate to ~/Library/Application Support/Sublime Text 3/Packages and run this command from a terminal: git clone https://github.com/dzhibas/SublimePrettyJson.git Restart Sublime and the open up some unformatted json… Read More »