Shami's Blog

Sysadmin, Because Even Developers Need Heroes

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.

Read More...

Copying Content From A Word Document To A CKEDitor

2016-05-03 by Mohammad H. Al-Shami

So I’ve been assisting a customer with their website and I was helping them with some data entry. Most of the content they sent me was in MS Word format. Copying the text directly to Drupal’s CKEditor had all formatting messed up so I was copying to notepad, copying from there to Drupal and then formatting manually. This turned out to be a nightmare when I had to copy 10 tables in a single page.

Read More...

'apt-get update' Failing After A Fresh Ubuntu 12.04 Installation

2016-05-02 by Mohammad H. Al-Shami

So I’m currently working with a customer that requires Ubuntu 12.04 for their servers since their apps were built and tested on that version, so every new install I run into the following issue

Read More...

Corrupted image_captcha In Drupal

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

Read More...

Moving A Magento Instance To A New Domain

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

Quick one here, when you move a Magento instance to a new domain or URL it will keep redirecting to the old address. There is a quick fix

Read More...

HOWTO: Small Mail Server With Salt, Dovecot, And OpenSMTPD

2015-01-26 by Mohammad H. Al-Shami

Update: Sadly OpenSMTPD version 5.4.4 on FreeBSD broke the passwd table, I’m checking the Gills to get this fixed.

Update2: I am no longer using OpenSMTPD. I’ve switched to dma for servers that only need to send emails and went back to Postfix for servers that require an actual MTA. Not that OpenSMTPD is bad, I just prefer Postfix. I might reconcider in the future when OpenSMTPD is more mature.

Read More...

Perl One-liner To Generate htpasswd Passwords

2014-12-29 by Mohammad H. Al-Shami

Update: An easier way to do it that doesn’t require you to install anything special (Works with nginx)

openssl passwd -apr1

Instead of having to install Apache or use an untrusted website just to generate the required password, you can use the following perl one liner

perl -e 'chomp($password=<>);chomp($salt=`tr -dc A-Za-z0-9 </dev/urandom | head -c 1024`); print crypt($password,$salt)."\n";'

Using Your Own Router With The New @orangejo Modem

2014-12-03 by Mohammad H. Al-Shami

Update: I have since moved to Damamax and am MUCH happier with their service. Their network is more reliable, faster, and their support staff is wonderful. It’s a bit more expensive but considering the advantages I highly recommend switching if they cover your area.

Read More...

ADSL In Jordan

2011-08-03 by Mohammad H. Al-Shami

I’ve heard various complaints from a few friends of mine about the status of Internet connectivity in Jordan, especially ADSL. So I’m writing this article to explain what is going on and why ADSL the way it is, but first, some history.

Back in pre-broadband times, people used dial-up modems to connect to the Internet. The name “modem” came from the fact that data was being modulated (Turned from digital to analog form) to be sent over the phone lines, and demodulated (Turned from analog to digital form) at the other end. This utilized the same frequencies used for regular phone conversations, this is why you could hear the weird sounds if you picked the phone up while being connected to the Internet. Given the relatively narrow frequency range used by phones this technology was limited to about 56Kbps, the best speed I got was back in 2003 which was about 5KB/s for my downloads, and that was considered fast at the time.

Read More...

First Thoughts of @ZainJo's HSPA+ Service

2011-04-05 by Mohammad H. Al-Shami

Lately ISPs have been bombarding us with all sorts of Internet related ads, promising “high speeds” or “unlimited downloads”. Osama Hajjaj said it best with this comic:

Read More...