View/download a file not in the public directory with PHP

When you need to give users access to files that are not in the public directory, where you cannot simply use an anchor tag with an “href”, you need to do a bit of work. For example, if you’ve created an authentication system where only authenticated users can download or view a file, this [...]

share and enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Fark
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter

Create a Drupal site on an Ubuntu Server

This will help you quickly install a Drupal site on an Ubuntu server.

This is my script for this purpose. Use it as you will. This procedure assumes that you have already installed Apache, MySQL, phpMyAdmin and PHP. It also assumes that you are familiar with everything. This is probably not a beginner’s guide, [...]

share and enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Fark
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter

Upgrade Google Chrome from Beta to Stable on Ubuntu

If you have been running Google Chrome Beta on Ubuntu, you can now upgrade to stable! Mmm, stable, just like the cool kids.

Open a Terminal and type in the following commands:

sudo aptitude remove google-chrome-beta sudo aptitude install google-chrome-stable

Your settings will be preserved.

share and enjoy:

share and enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Fark
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter

Ubuntu command line: see PDF of a man page

So, you use the command line. And, you’d like to look at a command’s manual page.

Wouldn’t it be handy to open the page into another window, nicely formatted, all typeset and neat? That is exactly what this little script will do.

I keep my personal scripts and executables in ~/bin (the bin directory [...]

share and enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Fark
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter

New drawing for a project

This is a drawing I did for an upcoming project:

share and enjoy:

share and enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Fark
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter

Making and installing Python on a 1and1 shared host

In my last post I built and installed Subversion. In this post, I’ll build and install the current 2.x version of Python, which will be needed for Trac, later.

Similar to how we built and installed Subversion, where are the commands to install Python. As before, you will need to get the HTTP address [...]

share and enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Fark
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter

Komodo IDE macro to process current file with PHP Beautifier

I use Komodo IDE for dynamic languages. I like it because it works extremely well and you get a license to use it on whatever machine you happen to be sitting at. Also it works well in Ubuntu and Mac OS/X, both of which I use constantly.

Here’s a macro I use in Komodo [...]

share and enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Fark
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter

Installing Trac and Subversion on Ubuntu Ibex

These are basically my notes from installing Trac and Subversion on an Ubuntu Intrepid Ibex server.

Install Software Packages

sudo aptitude install libapache2-mod-python libapache2-svn python-setuptools subversion python-subversion sudo easy_install Trac

Create the Trac Environments Directory

sudo mkdir /var/lib/trac sudo chown www-data:www-data /var/lib/trac

Setup Apache2

Using the default Ubuntu [...]

share and enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Fark
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter

Ubuntu: Open Terminal from Nautilus

This will allow you to open a Terminal instance in context in Nautilus.

sudo aptitude install nautilus-open-terminal

You will need to restart Gnome for it to take effect. Note that all you user programs will be terminated…so save data first. Then either use , or:

sudo /etc/init.d/gdm restart

And Bob’s your uncle. Now you [...]

share and enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Fark
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter

Basic Password Protection for Apache Webpage

This is the bare bones basics to protect a web page or series of pages on an Apache web server.

.htaccess file

AuthName "SectionName" AuthType Basic AuthUserFile /full/path/to/.htpasswd Require valid-user

Replace SectionName with the name of what you are protecting (in and below the directory that you are putting the .htaccess file in. Example: [...]

share and enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Fark
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter