Super-Simple Twiggy Example

Recently, I had the need to set up a simple http server for a mini Perl app to handle long running processes. I was steered in the direction of a CPAN module called Twiggy. I searched long and far for a simple example to get me started but had no luck. Finally, my co-worker, David, guided me through constructing a Twiggy app in it’s simplest form. Here’s how it goes:

1. Create your application.

In app.psgi:
my $app = sub { my $env = shift; return [ '200' , [ 'Content-Type' => 'text/plain' ], [ "hello world\n" ] ]; };

2. Fire it up with Twiggy.

twiggy -p 5002

3. Ask the server a question.

perl -MWWW::Mechanize -le '$ua=WWW::Mechanize->new; my $resp = $ua->get("http://localhost:5002"); print $resp->content'

OR

telnet localhost 5002
GET / HTTP/1.1
Host:localhost

Posted in Web Development | Leave a comment

Started a Free Font Website

Just what you’ve all been waiting for… another free font website! Well, I did it. I’m using some cool technologies on a virtual private server to host 1-free-fonts.com, a font for lots and lots of Free Fonts. The site is fairly incomplete but I’m excited about it! Already getting some traffic from Google.

Posted in Uncategorized | 1 Comment

Apache Style Index Configuration for nginx

Since some of the sites I work on have quite a bit of static and dynamic content, I have found that if the urls follow a similar pattern between static and dynamic, it is easier for users to follow, and easier as a developer to manage.

So here’s what a dynamic url on one of my sites might look like: example.com/jokes/category/funny

Here’s what one of the static urls on my site might look like: example.com/Jokes_About_Page.html

To me, this is confusing, and inconsistent. What if in the future that page is run through a dynamic controller?

This is why I like the feature that comes built with Apache. You specify a default index page that Apache looks for in each directory.

So instead of my previously stated example example.com/Jokes_About_Page.html, you could create a url that looks like this: example.com/jokes.

You would simply create a directory called jokes in your root directory, and then put index.html in there. Well, either I didn’t do the right search, or I wasn’t reading the docs correctly, because I didn’t see any obvious way to do this through the nginx config. After some trial and error, here’s what I came up with for the nginx config:

location ~ ^/(.*)$ {
  try_files /html/$1 /html/$1/index.html;
}

This will first look in html for the exact file you specified, and then if there is nothing there, it will look inside a folder with that name for index.html. Hope this helps someone!

Posted in Web Development | Tagged , , | Leave a comment

Free Refills!

Don’t you hate it when you buy a drink, and then find out that refills cost extra! Well, Propellorhead Reason users experience the exact same frustration! The users purchase the software, and it comes with lots of samples, but, in many cases, it doesn’t have everything you need.

That’s why I am currently developing a new website dedicated to quenching Reason user’s thirst for Free Reason Refills. That’s right: Free! It’s still in the development stages, so stay posted and watch it grow!

Posted in Music Production | 1 Comment

I Think There’s Something Wrong

Here’s an old song that I decided that I like. Light hearted and depressing. Just like I like ‘em.

Somethings’s Wrong

Posted in Music Production | Leave a comment

Recording In Provo Utah

Recording in Provo Utah has been a lot of fun. I’ve had opportunities to work with many different artists mostly related to pop and Hip Hop, but some others. Some of the most noteable:

I produced, and recorded 3100′s Miley Cyrus “remix”.  http://www.youtube.com/watch?v=keNwCgdiAJk Working with these teeny boppers was a rough road, but in retrospect, I’m glad I did it.

I wrote and recorded Phaya’s track titled “No Haiti, No Cry” along with several other tracks. http://www.youtube.com/watch?v=LhacZt9Nk9g

I’m looking forward to meeting and working with new talented artists!

Posted in Music Production | Leave a comment

Musical Collaboration

Recording at Old Mill

Recording at Old Mill with Phaya

Throughout the years of working with music, I’ve had countless opportunities to work with musicians, and non-musicians on a wide variety of projects including hip hop, pop, acoustic, indie, rock, and more. Some have led to more work, while others have led to nothing.

What does it take?
The success of a musical collaboration is based on three things (in order of importance): The relationship between the those working on the project, the collaborates seriousness, and the musical ability of the involved persons.

Relationship
Some may be surprised by this being the most important element for the success of a musical collaboration, but I strongly believe it is. For example, one of my pop clients brought in a group of hip hop producers and artists for a potential collaboration. They were speaking gibberish commonly spoken by those involved in hip hop culture and had really only come to show “how hard their songs could hit”.

It’s important to build at least some type relationship first, and then create music because music is more about feeling and emotion than it is about music.

Seriousness
If you want to get a song done, all parties have to be serious and goal oriented. I have had countless sessions where a client or friend comes in to record, and little is done. Sometimes, it’s my fault, and sometimes it’s their fault.

Bottomline is that if you’re both not serious about getting it done, it won’t get done.

Musical Talent
And least important in my list of important elements is musical ability. This is not to say that it doesn’t help a project, or that it’s not necessary, but I believe the other two factors play a greater role. Some of my favorite creations have come from individuals who have little musical background and are able to focus more on the emotion and mood of the song than the technicalities of the music.

A perfect example is the Bosc project. Grant, my old roommate, had a strong influence in getting it started and also influenced the general idea of the project. He helped with lyrics and music on a few songs that I’ll be posting shortly.

Posted in Music Production | 2 Comments

WordPress Apycom Menu

While putting this site together, I found this really cool jQuery menu system called Apycom. It’s a very well built menu system that incorporates Web 2.0 styles, and spiffy animations. In short, integrating the Apycom menu into WordPress was hell.

Why was it so difficult, you may ask? Because of the way the WordPress templating system works. I’m a relatively new developer, and I deal mostly in Perl, but it was a disaster. The Apycom mark up is a little different than your run of the mill Stu Nicholls menu that is used so often, so it requires some basic html tweaks. Well, to do these basic tweaks I had to hack up a Zack Design WordPress plugin, which took several hours to get it just right.

Not only that, but WordPress does a terrible job of printing the mark-up, so I had to copy/paste the css in order to format it and make it readable so I could compare it to the proper Apycom mark up.

Why is WordPress templating so bad? In my opinion, you should be able to define the format of your menu in plain CSS somewhere, and then WordPress should know what to do with that.

Posted in Web Development | Tagged , , | 6 Comments