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.
I’ve been building trivial web pages for automating tasks for years, but one of things that bothered me the most was having to manually order the OPTIONSs inside SELECTs. I don’t remember where I got the code from but just wanted to share
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.
Setting it up is just a matter of downloading a single EXE file and adding it to PATH, as opposed to having to install NodeJS, then Hexo
Shortcodes are part of the theme, not a plugin
Go themes are close enough to Jinja2 which I have been using for a couple of years now with Salt and Ansible
In general, Hugo is easier to maintain in git as the whole folder can be tracked, whereas with Hexo, the node_modules folder needs to be in .gitignore
Hugo supports multiple categories per post, whereas Hexo doesn’t
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.
I have recently switched to Babun. It’s, IMHO, the best Windows shell so far. Combine it with TidyTabs and you have a very nice solution. But I was unable to get hexo deployment to work well with it so I had to use git bash. git bash would show a popup asking for my SSH key password while Babun wouldn’t.
I found the solution here, just enable the SSH-agent plugin in zsh
# ~/.zshrc plugins=(git, ssh-agent)
You will just be prompted for the password of your SSH key when you start Babun.
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 :)
I’ve been wanting to get shami.blog ever since the generic TLDs have been introduced.
Now I finally have it, welcome to the new domain :).
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.
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