Waiting on a process/port/service with a custom Upstart service

Here are a couple Upstart configuration options for waiting on process dependency.
These files go in your Upstart /etc/init directory. Not the best way? Let me know!

Running ezstream as a startup service with Upstart

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:

Arrow drawing tool for Adobe Flash CS2, CS3, CS4.

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

Python paths in subprocess.popen with Apache mod_wsgi and virtualenv

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.

Installing multi-core Apache Solr 4.x on Debian, Ubuntu, Red Hat, CentOS, and more

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!"

Disable/Prevent hotlinking of your Drupal images in Varnish or Apache

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:

The definitive Drupal "Field API Option List vs. Taxonomy" pro & con list

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.

Making a custom block with an admin settings form in a Drupal module

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.

Compiling the PDO_4D extension in recent versions of PHP5

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:

Use the TeamworkPM API to publish your Task List

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!

Pages

Subscribe to Front page feed