Friday, Nov 14th, 2014

This is a method to run an ezstream icecast2 audio stream as a startup service within a Upstart init system. This method will also work for anything else which needs to run as a service.

I assume you have icecast2 installed and functioning: http://icecast.org/docs/icecast-2.2.0/basic-setup.html

Create a configuration file for ezstream in /etc/icecast2/ or in a project specific directory:

Sunday, Sep 21st, 2014

Some Adobe Flash projects require you to draw a lot of arrows. This can get tedious. So, many years ago, I wrote an Arrow drawing tool. It was written for CS2, but still works well enough in CS4.

You can:

  • Draw single sided arrrows
  • Draw double sided arrows
  • Draw curved line arrows
  • Adjust the width of the line
  • Adjust the ratio of the arrow head width to the line width

Tuesday, Jun 17th, 2014

If you are using subprocess.Popen to run an external process while running Python/Django with a virtual environment in Apache via mod_wsgi you'll discover the new processes run outside of your virtual environment. In my case, I need to set the PYTHONPATH environment variable to get everything straight. Rather than hardcode it or the sys.path in the external script, I'd like to set it to the same value as the existing environment.

Monday, Mar 3rd, 2014

I've installed Apache Solr on a range of servers over the years. The consistent problems are I don't do it enough to memorize it, but it's enough to be frustratingly repetitive. I end up researching the process every time. I've discovered this is a common problem for many people. There are numerous blog posts describing the process in detail. Download this, configure that, etc. This time I needed to install Solr on two local dev machines, the staging server, and the production server. I thought: "Four times? Nope, I'm scripting this!"

Friday, Feb 7th, 2014

I'm going to assume you know what image hotlinking is and get to the details of prevention. The easiest to way to setup hotlinking prevention is to disable it in your Drupal site's .htaccess file. There are a few problems with this method:

Tuesday, Dec 31st, 2013

Here I am building out a content type for a new project again. I've got to decide whether to use a Option List field or a Taxonomy field. It's an easy choice right? Right? Once you think far enough down a site roadmap, you'll discover it rarely becomes a simple answer. I've read many articles on the subject and nothing I've found seems to cover all details. That being said, if you find any details or related links I've missed be sure to let me know in the comments.

Friday, Jul 5th, 2013

Often while building a Drupal website, you'll need to create a custom Block containing HTML and content. Completely standard right? It's a problem when your client or the site maintainer needs to change some of that content. They are forced to wade through significant amounts of HTML to find that little bit of content to update. Instead, why don't you build a custom settings page? Your site maintainer gets a simple form to update and you get variables to output.

Tuesday, Jun 25th, 2013

Are you running Ubuntu 12.04 or 14.04 ? Are you working in PHP5? Do you need to access 4D database hosted on an external server? Have you discovered that PDO_4D won't compile when downloaded via PECL? Have I narrowed this to 0.001% of the world yet? Still with me? Well! That is exciting.

Here is how you can compile and install PDO_4D:

Wednesday, Jun 5th, 2013

I received a request from a few co-workers: They wanted their complete task list available to everyone in the company. The easist solution is to add everyone to their projects or give everyone admin access, but neither of those options are acceptable. So, I finally had an excuse to try out the TeamworkPM API!

Thursday, Mar 14th, 2013

Exporting or dumping a database with mysqldump, pg_dump or sqlite is a common procedure. The problem is the programs always run as fast as possible generally monopolizing your hard disk and sometimes your CPU. This can noticeably slow down other processes. Generally, responding to a HTTP request or a simply a ls command is more important than the database dump. If the dump takes slightly longer you'll probably never notice it.

Pages

Subscribe to Front page feed