Jekyll is Awesome

This post is for readers/friends who want to get started on their own blog, but don’t know where to start.

Over the years, I’ve had a countless number of conversations with programmer friends about how awesome Jekyll is and how awesome Github is for letting you host your own website/blog for free. However, the usual responses from friends include:

  • "Jekyll sounds too difficult to setup and maintain."
  • "what is git?"
  • "Git-what??"
  • "why not Wordpress?"

Jekyll is a static page generator written in Ruby. In this post, we’ll be using Jekyll to generate our blog. Also, with a few commands in terminal, you’ll have a working blog up in less than a few minutes (depending on your connection speeds). Here is a link to the Jekyll website.

git is a open source version control system designed for small and large projects. Many developers/companies are using and supporting git everyday. I myself use git everyday for various small and large projects that I am working on. In this post, I will not get into the specifics of how to use git, however you can learn more about that by youtubing “git tutorials” or checking out this link.

Github is a website that allows you to contribute, share, and show off your git repositories to the world. Also, Github offers a free web hosting service called Github Pages, which is what you are going to use to get your Jekyll-based blog running on Github. Bonus: here is a link by Tom Preston-Werner called the Git Parable.

I’ll get to why I don’t recommend going the wordpress way at the conclusion of my post.

Don’t be afraid of what comes next. I’m going to try and explain everything as clearly as I can in this post!

Getting Started with Jekyll

  1. Your machine is using a unix/linux operating system.
  2. You are used to using a command line interface.
  3. You have ruby installed on your machine.
  4. Today, is not the first day you have heard the term HTML, CSS, or Javascript (or ruby).

Check to see that you have ruby gems installed on your machine. You can check by finding the verion number typing using the following command and pressing enter in Terminal.

gem -v

If you have ruby gems installed on your computer, please skip to Part three. If you don’t have ruby gems (no version number appeared) then, please read Part two.

Install ruby gems by going to their website and downloading the TGZ file. After downloading, change directory in terminal to designated download folder. Next, copy and paste these command into terminal and press enter:

tar xvzf rubygems-{ version_number }.tgz
cd rubygems-{ version_number }
sudo ruby setup.rb

Ruby gems should now be installed on your machine, check by entering the following command:

gem -v

You should now see a version number, which will prepare you for Part three.

Install Jekyll on your machine by entering this command in terminal (within a desired directory):

gem install jekyll

Next, change your directory to your documents (or where you please). Then type the following and press enter:

jekyll new my-site

This will create a jekyll folder called my-site. Next, change directory to my-site, then enter the following command:

jekyll serve -w

This will generate the static files from that directory into a working website folder called _site and will start a ruby webserver pointing to that folder.

Next, go to your web-browser and type “localhost:4000” and press enter.

You should be staring at what the above example displays. Congratulations! This might just be your first jekyll-based website!

If you have any problems setting up Jekyll, read the documentation page here!

Getting started with git

You’re going to need git on your machine. If you already have git on your machine then you should skip to the Important Git Commands section.

For OSX users, go to this link to download git directly from the git website.

For Linux users, in terminal enter:

sudo apt-get install git

First, make sure you update and upgrade your packages to get the latest version of git!

Git Commands

The three git commands you will primarily use for “publishing” your website/blog:

Again, I will not be going over how git works because that is a blog post in itself. Take some time learning git before getting started with Github (it won’t take long to understand how git works)!

Check out this link for more information on using git.


My biggest reason against using a wordpress as a blog platform for a software developer is that its just not modern platform anymore. Whereas with Jekyll, you learn alot about modern (important) technologies like git and github along the way (as well as a little Ruby). I highly recommend that you pursue learning more about web design and development regardless of your current title.

Feel free to send me an email if I have made any mistakes in this post! Thanks for reading!

Also, check out this link for more information on using the free website hosting service, Github Pages!


Using Emacs for iOS Development

This post is primarily for iOS developers who are already familiar with Emacs and Xcode, yet want to code their objective-c applications in a distraction-free environment via Emacs.

In this post, I will be going over how to use Emacs as your primary editor for iOS Development. For reference, here is a link to my .emacs file.

Before we begin, I am going to assume you already have the installed following:

  1. Xcode (latest stable)
  2. Emacs v24.3

Inside Xcode

First, you will need to build your project in Xcode. Open Xcode and create a new Xcode project. Next, choose template: iOS > Application > Empty Application. Finally, name the product my_app.

Inside Emacs

Next, add the following to your .emacs file:

;; Objective-C
(add-to-list 'auto-mode-alist '("\\.mm\\'" . objc-mode))
(add-to-list 'magic-mode-alist
	     `(,(lambda ()
		  (and (string= (file-name-extension buffer-file-name) "h")
		       (re-search-forward "@\\<interface\\>"
					  magic-mode-regexp-match-limit t)))
	       . objc-mode))
(require 'find-file) ;; for the "cc-other-file-alist" variable
(nconc (cadr (assoc "\\.h\\'" cc-other-file-alist)) '(".m" ".mm"))

(defadvice ff-get-file-name (around ff-get-file-name-framework
				     &optional suffix-list))
  "Search for Mac framework headers as well as POSIX headers."
   (if (string-match "\\(.*?\\)/\\(.*\\)" fname-stub)
       (let* ((framework (match-string 1 fname-stub))
	      (header (match-string 2 fname-stub))
	      (fname-stub (concat framework ".framework/Headers/" header)))
(ad-enable-advice 'ff-get-file-name 'around 'ff-get-file-name-framework)
(ad-activate 'ff-get-file-name)

(setq cc-search-directories '("." "../include" "/usr/include" "/usr/local/include/*"
			      "/System/Library/Frameworks" "/Library/Frameworks"))

Next, type “M-x load-file ~/.emacs” and press enter. Alternatively, exit Emacs and log back in.

That concludes this post, if you are interested in utilizing some of Apple’s commandline tools to build out your project using Eshell or terminal check out the sources below. Also, feel free to send me an email or comment below if I have made any mistakes in this post! Thanks for reading!


Update May 2014

Its been quite a long time since I’ve updated my blog with a new post. So here it goes, I’ve been extremely focused on school and family as of this last year. I have about one more year left of school and am looking forward to graduating with a Bachelors of Science in Computer Science from the University of South Florida. I’ve been programming practically every day, where I’ve gained a lot of interest in learning mobile development. My current developer setup: Emacs, iTerm (w/zsh), and Firefox. I also enjoy listening to music on Soundcloud.

Things I’m learning/doing over the next few months:

  • Python (web development, basic scripting, and more).
  • iOS development (have an app in the app store by the end of Summer).
  • Spend more time exercising.
  • Ace my Summer classes!