Installing, Configuring and Customizing Arch Linux

Arch Linux is a great distro that boasts bleeding edge up-to-date rolling releases as well as a very light and efficient base install. There is no graphical install and it expects you to have some basic Linux chops already just to perform the installation. Beginners shouldn't be scared away though because Arch Linux has a great wiki and awesome documentation.

Installing and Configuring FreeNAS 8.3.1

FreeNAS is a great option for home or enterprise level network attached storage(NAS.) It is based on FreeBSD so it benefits from many of the unique BSD tools like jails. Jails are a secure way of segmenting a process. The plugins available run in jails to help with security. Installing FreeNAS itself is as simple as following the prompts. I'm not going to cover the base installation because it is simple, but will focus more on the post-install configuration. Note that the drive you install FreeNAS to can't be shared over the network.

AJAX Pagination and Sorting with CakePHP 2.x

CakePHP comes with a core JsHelper that allows a developer to call PHP functions that will create the JavaScript using a number of libraries including jQuery and Prototype. Pagination in CakePHP is a very common task and it can be enhanced using AJAX. Fortunately the Pagination component/helper are built to handle the AJAX. You can set the pagination defaults in the controller with the code below. Alternatively you could set specific elements of the array inside an action with a call like $paginate['conditions'] = array();

Living Without Adobe Flash Player

Richard Stallman founded the GNU Project and the Free Software Foundation. They have done a lot for the free software movment. Richard Stallman has a pretty hardcore philosophy and he is quite a character, but he is the leading role model for living life with only free software. For example, he uses a specific laptop brand because he wants to use a free bios. He doesn't use a cell phone because there are no totally free phones available. He is willing to make sacrifices to avoid something he has deemed unethical.

Exchange 2010 Calendar and Mail with Thunderbird

There is a way to get your exchange mail and calendar in Thunderbird, however I'll be honest I still had issues with the calendar after doing all of this. The calendar would load once, but then not load again. I'm going to provide this for reference. Perhaps in the near future some bugs will be sorted out in these addons, and maybe someone will have a comment on the configuration. I have included specfic versions numbers. If you want GOOD Exchange 2010 support, I recommend using Evolution.

Web Scraping Tutorial in JavaScript (Node.js)

Node.js is, according to their website, "a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices." It is essentially a javascript interpreter for the command line. With Node.js, you can write scripts in JavaScript just like you would with PHP and Python.

AJAX Form Submit with CakePHP 2.x

CakePHP has some great tools for a PHP developer to crank out JavaScript functions using only PHP. The JsHelper supports Prototype/Scriptaculous, Mootools/Mootools-more, and jQuery/jQuery UI. Refer to the CakePHP Book for details on all the functions provided by the JsHelper. In this example we're going to look at a creating a contact form that submits via AJAX, but also works properly for users without JavaScript.

Writing Secure Code with CakePHP 2.x Forms

CakePHP is one of my favorite web frameworks. There is one glaring security hole that caught my attention though. Without proper care from the developer, users have the potential to tamper with data sent with forms. For example, a common operation is to take the value from a form and save it like this:

$this->User->save($this->request->data['User']);

Let's say the user manipulates the form and adds this line:

Responsive CSS Media Queries

Responsive design has been a big boom recently and it's still a mystery to some. Let's see just how easy it really is. Let's say you want to start simple with a normal desktop version of your website and one suitable for smaller screens like mobile phones. Let's start with something like the menu. You can create one menu and set it to display for large windows and make a compact menu, perhaps a dropdown, for smaller screens. This is where CSS Media Queries come in. In the HTML there can be two different menus created with only one set to display at a time.

Twitter Bootstrap Review

Twitter Bootstrap, which was renamed to simply Bootstrap, is am amazing tool for web developers. It is now my favorite way to get a new site going. As a developer, I feel it is powerful and flexible, but not bloated. It is just the right tools for almost any project. Check out their official website here. It comes in a very light and simple package that includes:

Google Analytics Event Tracking in Drupal 7 (Hooks & OnClick)

Event tracking with Google Analytics has pretty much become a standard on all new sites. Google provides ample documentation on using the analytics, but the tricky part is getting it to integrate the way you want with Drupal. The Drupal Google Analytics module offers basic functionality out of the box. It can track page hits, specific user roles, offsite links, and download clicks. It also supports custom variables using tokens.

Chrome Extensions for Web Developers

There are many 'Top X useful extensions for web developer' posts out there. The problem I have with them is that they recommend multiple modules that do the same thing. For example, the 'web developer' and 'pendule' modules both offer a color picker tool, so I don't really see the need for another special extension just for color picking. Same with browser resizing, why would I want 3 extensions installed for that? Also, everyone should already have a method of taking screenshots (full or partial.) Even Windows comes with a basic snipping tool that does a perfect job.

16 Recommended Drupal Modules

These 16 recommended Drupal modules are not all recommended for every project, but they among the more useful modules out there. Many of them are useful only for site developers.

Admin Menu - An improved admin toolbar with drop down menus.

Backup Migrate - A must have for importing/exporting Drupal databases. Conveniently omits the data from the cache tables. Admins can schedule regular backups on a timed basis.

CakePHP vs Drupal

There are many PHP frameworks out there, but 2 of my personal favorites are Drupal and CakePHP. WordPress is another popular in the world, and I have done many projects with it. I will say that WordPress has great documentation and a clean API, but it is rather limited in its capabilties. CakePHP and Drupal have proven to be flexible, scalable, and perfect for certain uses. The bottom line in this debate is that both are great, and both serve their purposes. Between CakePHP and Drupal, I feel a project of any size can be accomplished. 

Create Script from Bash History

The script program (bsdutils) will output the whole terminal output to a file. This can be helpful for logging and creating scripts out of history.

The approach here is to output the command history to a file and then manipulate the file a bit to get what we want.

history 3 > script.sh

This will output the last 3 commands to script.sh. Note that the actual history command will become the most recent event in history, and will be output in the file. This can be edited out manually or using this command:

Bash Shortcut Keys

Sometimes when working we don't always have a fully featured keyboard. Whether using a small portable bluetooth keyboard, old software, or you just want to be a command line ninja, these shortcuts are very important to know to increase productivity and to work through technical limitations on keyboards.

Useful Linux Bash Shell Aliases

Typing long commands over and over gets old. Use bash aliases to make your life easier and impress your peers. Add these to your .bashrc and/or .bash_profile. Personally I use only one and symlink them together. These are just some examples of how you can use alias. Anytime you find yourself repeating lengthy commands think about creating an alias. Optionally, if it's a long command you are only going to be using for a short period, be sure to use history tools like ! and !? to quickly repeat previous commands.