Category: System Administration

  • Install Ruby on MacOS

    MacOS comes with already pre-installed system Ruby. However this Ruby, most likely, will be outdated for Shopify development. You don’t want to mess with the pre-installed system Ruby. What you want to do is to install another Ruby using Homebrew and set the $PATH so the Homebrew-installed Ruby takes priority over the macOS system Ruby. https://mac.install.guide/ruby/13

  • Install MSSQL Server Locally

    In this post we will take a look at how to install MSSQL server for local development using Docker.

  • Automated Deployment of Laravel Project

    In this article I would like to share my approach to automated deployment of a Laravel project. I have been successfully using this approach for my side projects. In this article I will share Laravel project deployment on Linux (Digital Ocean) server. In a nutshell deploying Laravel project consists of “building” it (installing composer dependencies,…

  • Loading Start Scripts for GitBash on Windows

    I use GitBash as my shell on Windows. Below are the scripts I normally load including git ssh agent. Useful git aliases:

  • Too Many Redirects

    Sometimes your website may be making more redirects than necessary to account for https and stripping or adding trailing slash.

  • Block IP Addresses in .htaccess behind Load Balancer

    Sometimes you need to block access from certain IP addresses to your web site. It is easy to do in .htaccess file if you are running Apache. What if your server is behind a load balancer ? The code below lets you block IP addresses when your server is behind AWS load balancer.

  • Ubuntu Command Line Search

    Sometimes I have to go through log files searching for a certain error message. The command below will show you log file names and lines where the message was recorded. grep -rnw ‘logs/’ -e ‘Hello World’ To learn more about “grep” command use the following link https://help.ubuntu.com/community/grep

  • Check Available Space on Ubuntu

    Recently I got into a situation where I ran out of free space on my Ubuntu instance. The first thing you need to do is to check how much available space you have. The command below will give you the general idea. df -h To list the files/directories that take up most of the space…

  • Finding Directories And Files And Changing Permissions

    I always forget how to do this: find /var/www/html -type d -exec chmod 755 {} \; find /var/www/html -type f -exec chmod 644 {} \;  

  • Node.js App on AWS EC2 Instance

    To get started let’s spin up an Ubuntu 16.4 LTS instance on AWS.  After instance is up and running, we need to add port 80 to the instance’s security group inbound rules.  There should be at least two ports open: 22, and 80. Now we can ssh into the instance and install Nginx, Node, and…