Shami's Blog

Sysadmin, Because Even Developers Need Heroes

Disable Google Analytics While Running Hugo Test Server

2017-04-24 by Mohammad H. Al-Shami

So while I was writing my previous post I realized that Google Analytics was being called from the localhost server. I also had lots of grief with Disqus back when I migrated to Hexo; It filled my account with posts related to localhost. I wonder why Disqus built it this way.

I hard-coded the Disqus URL in my theme (Both Hexo and Hugo) but then realized I can’t do the same for Google Analytics. I needed a way to disable it altogether. The fix turned out to be quite simple.


Adding Oracle Support PHP On Ubuntu Xenial

2017-04-24 by Mohammad H. Al-Shami

I’ve been recently asked to enable a web server running to PHP to connect to an Oracle database for a client. Sadly this doesn’t work natively on FreeBSD so I’m documenting how I managed to do it on Ubuntu Xenial. This was inspired by this post and this post.


Use Just What You Need Out Of Bootstrap And Similar Frameworks

2017-04-21 by Mohammad H. Al-Shami

If you know me, you’ll know I’m obsessed with speed. I like websites that are light and load quickly. At first I used WordPress because I knew how to optimize it and make it load quickly. I also used the GeneratePress theme because I loved how quickly it loaded. You can read this post to see why I migrated away.

Ghost introduced me to Markdown and I could never look back, but since I didn’t find any themes that I liked and the fact that Ghost looked as if it hadn’t been maintained in a while lead me to look for alternatives.


Allowing Read-Only Access To A Git Repository Via HTTP

2017-04-02 by Mohammad H. Al-Shami

Today I thought about a way to easily distribute an Ansible playbook. I thought about having a tgz file somewhere but I wanted read only access through HTTP in case I wanted to update clients that have already downloaded the content.

The easiest solution I have found was using cgit. Simply run it with nginx and fcgiwrap.


No Output From Drush

2017-03-16 by Mohammad H. Al-Shami

A while back Drush stopped working on my servers and it would just return without doing anything. Today I decided to finally debug the issue. Turns out the FreeBSD port just fetches the Phar archive and installs it.

After digging around I found the following post which says that Suhosin blocks Phar file execution. The fix turned out to be quite simple; Just edit the Suhosin ini file (in FreeBSD it’s /usr/local/etc/php/ext-30-suhosin.ini) and add the following after the “extension” line:

suhosin.executor.include.whitelist = phar

And you’re back in business :)

New Domain, Same Great Content

2016-11-23 by Mohammad H. Al-Shami

I’ve been wanting to get ever since the generic TLDs have been introduced.

Now I finally have it, welcome to the new domain :).

XBOX LIVE With pfSense

2016-10-07 by Mohammad H. Al-Shami

A couple of months ago I switched from running OpenWRT on a TL-WDR4300 to running pfSense on a Netgate RCC-VE 2440. Not that OpenWRT is bad, it’s only because I’m a big fan of FreeBSD and I’ve been wanting to run a similar setup ever since I discovered custom firmware like DD-WRT and afterwards m0n0wall and Soekris. When I finally decided to get the hardware I thought Netgate had a better offering and I went for it.


Hexo Photo Gallery

2016-09-27 by Mohammad H. Al-Shami

So while I was migrating my data over from wordpress there were a few posts with photo galleries. The options I had were to write each photo gallery by hand or use the photos array in the front matter. What I did was change the photos array a bit and added the following code as a module


Responsive Youtube Videos With Hexo

2016-09-27 by Mohammad H. Al-Shami

So now that I have finally finished fixing my content migration issues I can get back to writing.

While checking my old posts I noticed embedded using the {% youtube %} tag looked like this:


Welcome To My New Blog

2016-06-14 by Mohammad H. Al-Shami

Update: I have since migrated to Hugo which seems to be better maintained and generally easier for me to update. I have also started using Texts more for editing Markdown

I haven’t been very active on this blog over the years, one of the reasons was Wordpress itself; As nice as it is, I grew sick of updates always breaking something. Another thing that always made me feel uneasy was the email I got every once and a while from my blog telling me it updated itself. True, this is good when people ignore their blogs but I didn’t feel in control of my own blog any more and sometimes I wouldn’t have enough time to debug any plugins that broke when the blog decided it was time for me to upgrade.