Resolved: Fix SSL renewal issue on Gitlab Server

PROBLEM : I had hosted a gitlab server on Azure and it was not getting autorenewed. SOLUTION :  1. Check the current SSL cert path: sudo grep -n "ssl_certificate" /var/opt/gitlab/nginx/conf/gitlab-http.conf OR sudo grep -n "ssl_certificate" /etc/gitlab/gitlab.rb  You are likely to see something like this: nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.example.com.crt" nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.example.com.key"  2. In my case, I was using gitlab let'sencrypt. So, I installed certbot. sudo apt update && sudo apt install certbot -y  3. Obtain Fresh Certificate sudo gitlab-ctl stop nginx sudo certbot certonly --standalone -d gitlab.yourdomain.com sudo gitlab-ctl start nginx 4. Configure Gitlab to use new cert external_url "https://gitlab.yourdomain.com" letsencrypt['enable'] = false nginx['s...

Syntax highlighting in blogger

Problem: I want to have syntax highlighting for the code I share on my blog

Solution:

  1. I checked out this website: https://highlightjs.org/
  2. I downloaded the resources and upload them on to my server i.e. default.min.css and highlight.min.js
  3. Logged into my blogger and clicked on Edit HTML
  4. Find the closing 'head' tag and paste the following code there:
          
              <link rel="stylesheet" href="path_to_default.min.css"/>
              <script src="path_to_highlight.min.js"></script>
              <script>hljs.highlightAll();</script>
          
          
  5. Please note that in case of closing and opening tags of html, I used html entities.
  6. Yay! The syntax highlighting should be working now.