Find Your Way $HOME in Bash
Today I learned a shorter way to navigate to my home directory while in a Bash terminal. According to this page, when the cd command doesn't receive any parameters it defaults to $HOME. How convenient is that?! In fact, there are four ways to get to your home directory:
This Blog Is Now Open Source!
This blogging platform was built because I was sick of WordPress. I wanted something fast, simple, and easily extendible. The goal from the start was to create something that anyone could use but I didn't want to make the code available until it had a strong feature set. As of right now, the main features of the platform consist of the...
The BIG JAMBOX Is Awesome
I heard about the Jawbone BIG JAMBOX a couple of weeks ago and decided to order one on a whim. I've spent the last few days with it and am very impressed so far. It sounds great, it's portable, and the battery lasts a long time. The $300 price tag was worth every penny.
How ForkJoy Implemented AJAX Page Loads
This article will provide a fairly high level overview of how ForkJoy implemented its AJAX page loading system. ForkJoy uses Node.js and Express for its backend, Jade for templating, and JQuery on the frontend.
Your Boredom Is My Envy
About once a week I see a Facebook status similar to "sooooo bored!" and instantly become irate. Go find something new to learn, start a project, or get some exercise. I wish I could take the time that you are so carelessly throwing away and add it to my day, because there's no way I would let it go to waste.
Implementing a Blog Post Preview Feature by Reusing Code
Today I implemented a new feature for this blog, which is the ability to preview new posts before submission. Posts are written in Markdown so seeing a preview of the fully formatted post is very useful. Implementation literally took less than thirty minutes because I was able to make use of existing functionality that already existed....
How to Re-Run Prism.js on AJAX Content
Prism.js is a great library to handle syntax highlighting for code blocks on a web page. However, since Prism runs automatically after being embedded (hence why you need to include it at the bottom of the HTML) content that is loaded later is not highlighted. After console logging the Prism object in Chrome developer tools I discovered...
Restarting Workers in a Nodejs Cluster
We upgraded ForkJoy to Node.js v0.8 and decided to use the newly rewritten Cluster module. Cluster allows a parent Node process to manage multiple worker processes on a single port to better take advantage of multi-core machines.
Dynamically Pluralize Like(s)
I just wanted to share a snippet we use at ForkJoy for pluralizing the various "like" counters on the website. Every menu item has one of these counters and the text can read "no likes", "1 like", "2 likes", etc. Originally we were using an if statement to do this until we realized it can be fit on one line instead.