Shami's Blog

Sysadmin, Because Even Developers Need Heroes

Automating Hugo Deployments With Webhooks, Bitbucket, and CloudFlare

2017-09-14

I’ve been using Hugo for a while now and love it. I don’t update my blog much and with Hugo I don’t need to spend more time updating the CMS than actually blogging. The markdown files are hosted at BitBucket along with my other code and I use CloudFlare for protection as well as a CDN.

Read More - Automating Hugo Deployments With Webhooks, Bitbucket, and CloudFlare

Babun SSH/Git With TinyWall

2017-09-06

I was thinking of a way to make my laptop a bit more secure and started looking into alternative firewalls for Windows. I came across TinyWall which is an alternative front end to the Windows firewall so it’s not as intrusive as the other options. Everything was working well till I tried to pull a git repository from Babun and I got an the following error

Read More - Babun SSH/Git With TinyWall

Nvidia Drivers On Headless Ubuntu Server 16.04

2017-06-22

I wanted to do some GPU processing using a virtual machine running inside unRAID . First I tried Windows and it worked, but I read that running the code inside Ubuntu 16.04 would be more efficient.

Read More - Nvidia Drivers On Headless Ubuntu Server 16.04

Disable Google Analytics While Running Hugo Test Server

2017-04-24

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.

Read More - Disable Google Analytics While Running Hugo Test Server

Adding Oracle Support PHP On Ubuntu Xenial

2017-04-24

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 .

Read More - Adding Oracle Support PHP On Ubuntu Xenial

Ordering Select Options With Javascript

2017-04-23

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

Read More - Ordering Select Options With Javascript

Use Just What You Need Out Of Bootstrap And Similar Frameworks

2017-04-21

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.

Read More - Use Just What You Need Out Of Bootstrap And Similar Frameworks

Cropped Pagination Controls With Hugo

2017-04-11

I’m currently in the middle of migrating my blog (yet again) from Hexo to Hugo . Hexo is nice but I’m learning some HTML/CSS and decided to give Hugo a try and I liked the following about it

  • 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

Read More - Cropped Pagination Controls With Hugo

Allowing Read-Only Access To A Git Repository Via HTTP

2017-04-02

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 .

Read More - Allowing Read-Only Access To A Git Repository Via HTTP

Hexo Deploy With Babun

2017-03-28

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.

About Me

Dev gone Ops gone DevOps. Any views expressed on this blog are mine alone and do not necessarily reflect the views of my employer.

twitter linkedin