Ubuntu 10.04 Server for Drupal - Part 1: SSH Lockdown

Update (2011-12-10): I updated this article to make it a bit more clear and confirmed it works exactly the same on Lindode.

This is a step by step I used to set up SSH and lock down access on my Rackspace Cloud VPS running Ubuntu Server 10.04. There's a good chance this will work for other server providers and possibly other versions of Ubuntu. (But no guarantees.)

Disclaimer: This process worked for me, but it might not work for you. Be sure you understand what you're doing. You can lock yourself out of your server. Use at your own risk.

Git and Drupal: .gitignore refined

Since February when I shared my .gitignore file, I've refined it a bit. Here's the new version:

# Ignore configuration files that may contain sensitive information.
sites/*/settings*.php

# Ignore various other cruft
.DS_Store
.buildpath
.project
.settings
/backup
/tmp

Blog Tags:

Lazy Man's Guide to Drupal DB Performance

Or... How I got my server to run OK without wasting too much time.

Database performance, whether in Drupal or any other platform is serious business. There's a lot of benchmarking, analyzing queries, forming hypotheses, making changes, benchmarking again... I've done it and it can take a team weeks to hit performance targets on a major enterprise application. Everyone wants a shortcut. There really are no shortcuts, but sometimes a few tweaks can get you to "good enough".

Git and Drupal: my .gitignore file

UPDATE: I've since revised my .gitignore file. See the updated article.

If you're doing anything more than just experimenting in Drupal, you should be using some sort of version control software. If you haven't already picked a version control system, you should go with
Git. Why?

Blog Tags:

Drupal hook_page_alter() example

Frypan Module Explained

Thanks to Pasada Media's generous offer of a free beer for anyone demonstrating a live Drupal 7 site at the Toronto D7 Release Party, I decided to upgrade this site. Now I get to play with the new toys in D7!

Blog Tags:

The Problem with CSS Grids

The 960 Grid System: - designed to make page layout easier, but leads to tighter coupling between content and presentationCSS was designed to improve web page layout by separating presentation from layout. Basically, by separating content (HTML) from presentation (CSS) there is looser coupling from a computer science perspective.

Productivity Hacks - using Pomodoro scripts

Pomodoro Timer: This cute little tomato can help you focus on your work. A trick I learned could help you stay in the zone by reducing distractions.Pomodoro Timer: This cute little tomato can help you focus on your work. A trick I learned could help you stay in the zone by reducing distractions.It seems like many people in technology are like me... easily distracted and, shall we say, somewhat 'organic' in our organization. In the struggle to become more effective in my work, there are a few tools that I have adopted:

  • Twitter - a great tool for keeping on top of the latest trends in technology (and pictures of other people's cats).
  • GTD - (Getting Things Done, by David Allen - an excellent methodology for organizing tasks with a focus on clearing your mind to facilitate clearer thinking and greater creativity.
  • Pomodoro - a simple tool to help you keep your focus when you are actually doing the work. Here's a little about the technique: http://www.pomodorotechnique.com/ and here's the timer I use: http://pomodoro.ugolandini.com/

jQuery UI Accordion in Drupal 6

jQuery UI: It can add some great features to your site, but it is a bit difficult to set up in Drupal 6.jQuery UI: It can add some great features to your site, but it is a bit difficult to set up in Drupal 6.jQuery UI is a collection of jQuery plugins and offers great interface widgets that are easy to use. You probably recognize many of them from websites you've used. The only catch is that they don't work with Drupal version 6 without a few tweaks. I had an idea for using the jQuery UI Accordion widget and I had to figure out how to get it working on my D6 website.

Library conflicts

There is a jQuery UI module for Drupal (http://drupal.org/project/jquery_ui). Since jQuery UI is a third party library, you have to download it and install it in the module directory. Now there are a few snags... The native jQuery library for D6 is 1.2.6. The Drupal jQuery UI module tells you to download the jQuery UI v. 1.6 library which works with jQuery v. 1.2.6. But, the jQuery UI v. 1.6 is no longer available on the site. jQuery UI v. 1.7 is available, but it requires jQuery 1.3. That left me with a choice: find the obsolete library, or upgrade Drupal's native jQuery library. I chose the latter.

Making the Drupal Module Work

Following up on my last post about Writing a Simple Drupal Module, I thought I'd add some details about making it an actual module and making it a usable module. Where I left off last time, I actually had to go into the database and manually insert feeds to process.

Writing a Simple Drupal Module


A while back I had an idea to do a simple Drupal Module to take Environment Canada's weather RSS feed and automatically it to Twitter. I didn't see anything in the Drupal contributed modules, so I decided to write my own. (A proof of concept is running on the website: http://canweather.com.) The logic is quite simple:

  1. Read an item from the RSS feed.
  2. Record that I have read that item.
  3. Process the text to decide whether to post the item, and make any changes (eg. truncate long messages).
  4. Post the text to a Twitter account.

Pages

Subscribe to cleaver.ca RSS