Setting up and maintaining Existential Media I’ve learned some things that I would like to share. I’m adding my hacks and code that I’ve used for Existential Media to GitHub. This will include some WordPress themes and altered plugins initially, but I will be adding more. Transparency. Roll your own.
Archive for the 'Internet' Category
Since setting up our new server, I’ve been trying to figure out user/group permissions. I wanted WordPress to be able to write to the server (to create thumbnails, update plugins, etc), and at the same time I wanted to be able to write to the server logging in as my user in Transmit. I had resolved to setting the user/group to www-data (the Apache user, so WordPress could write to the server). Then I added myself to the group www-data and set the permissions for all the files to 775.
That worked. But it didn’t seem right. On our shared server before this it wasn’t like this. This is when I discovered using suexec and mod_fcgid. Using suexec PHP can run as my user. That way I can have the correct file permissions and be the owner of my files. It took me a while to find information on how to set this up, and once I did I was definitely confused at points. I based my work on two tutorials.
The first tutorial I worked with was on HowtoForge. I skipped the steps on installing Apache and setting up virtual hosts. I followed the other instructions pretty closely. But once I had finished, the server was throwing up 500 errors.
The second tutorial I found to help me with where I hadn’t succeeded. The steps were fairly similar. The one difference I noticed that fixed my problem was to make the php-fcgi-starter executable. Wow. Simple.
chmod a+x

DIY. Punk. Whatever. DIT. Open source. I have been semi-successful in moving off of shared hosting to VPS hosting with Slicehost. I hope you don’t get the impression that this was easy and I could setup a server whenever with my eyes closed. I put some work into it. And that is why I’m writing this. This post is coming to you from Ubuntu 9.10, Apache 2.2.12, MySQL 5.1.37, and PHP 5.2.10. All of which I installed with apt-get. I chose Ubuntu because I had a little experience with it already, and because since it is pretty popular that means a lot of people are working on it.
I chose to do this project because I thought it important to know more intricately how these kinds of things work. I had a pretty good understanding of the basics, but I wanted to delve deeper. Optimize. It was an art project for me. Roll your own. Also, I’m not going to lie, there was a monetary aspect to this as well. The price is the same as my old server, but the new server is much more well endowed.
Let’s talk about process. To setup the server, I followed this tutorial from the Slicehost wiki. I did some things differently because this tutorial is a little outdated. For example, they instruct you to build Apache from source, but I so much more easily installed the Ubuntu package. Also, this tutorial doesn’t really talk about setting up VirtualHosts in Apache, which is necessary for adding domains. Here are my steps for doing this in Ubuntu.
-
cd /etc/apache2/sites-available -
sudo cp default yourdomain.com -
sudo nano yourdomain.com - Add the line
ServerName yourdomain.comand change theDocumentRootandDirectoryto where your site resides on your server (i.e. /var/www or your home folder) - Ctrl-o to save your changes, then ctrl-x to exit.
- Run
sudo a2ensite yourdomain.comto add your domain to sites-enabled - Then reload Apache with
sudo /etc/init.d/apache2 reload
This now means more of the responsibility for how things work is in my hands. No more relying on others. Taking care on my stuff.
For the new blogs page I wanted to put together an accordion-like feature for viewing the posts to make it feel somewhat like a feed reader. I looked at different javascript libraries for this and chose to go with jQuery, not that others wouldn’t work, but because I had some limited experience with it.
I started toying around with the slideToggle() function, but after a couple hours I had to look around the internet for some help. I couldn’t have done it without Steve Krueger’s tutorial. Although I didn’t follow it exactly, it helped be over a few hurtles.
Here is the code I ended up with.
jQuery(document).ready(function($){
$('.story').hide();
$('.title').click(function(){
if($(this).is('.active')) {
$(this).toggleClass('active');
$(this).next('.story').slideToggle('fast');
return false;
} else {
$('.story:visible').slideUp('fast');
$('.title.active').removeClass('active');
$(this).toggleClass('active');
$(this).next('.story').slideToggle();
return false;
}
});
});
Also, as I was delving deeper into this project, I spent a lot of time around the WordPress Codex. I found this great function called wp_enqueue_script for loading javascript libraries. This is for use in WordPress plugins and themes so there is no conflicts or superfluous code. Pretty neat.
Update — June 29
I edited the page so when opening an item it will scroll to the top of your window. So much better. Some help from Learning jQuery and Marc Grabanski. I am using the jQuery.ScrollTo plugin.
Here is the updated code:
jQuery(document).ready(function($){
var scrollTop = jQuery(window).scrollTop();
$('#content > div.story').hide();
$('#content > h2.title').click(function() {
$('#content > h2.title').removeClass('active');
$(this).addClass('active');
var $nextDiv = $(this).next();
var $visibleSiblings = $nextDiv.siblings('div.story:visible');
if ($visibleSiblings.length ) {
$visibleSiblings.slideUp('fast', function() {
$nextDiv.slideToggle('fast');
jQuery('#content > h2').each(function(i, h2){
h2top = jQuery(h2).offset().top;
if (scrollTop h2').each(function(i, h2){
h2top = jQuery(h2).offset().top;
if (scrollTop < h2top) {
jQuery.scrollTo('.active', 300 );
return false;
}
});
}
});
});
I’ve had a very terrible couple of years coming up on the Internet. When it began, it was easy. I had my gateway laptop, I used IE until 2004 when I heard about Firefox. It was a simple choice. Firefox had tabs, it was faster, it had the luster of being open source. (In fact, it inspired my fanaticism for all things open source). But in 2005 I got a tiny powerbook and Safari was so cute and new. I was disappointed with Firefox on my powerbook. The widgets were ugly and pixelated, nothing like aqua at all. At this point I was dedicated to Safari, only using Firefox for sites that rejected Safari for whatever reason.
But I wasn’t satisfied. I started flirting with other web browsers: Shiira, Opera, OmniWeb, Camino, Optimized Firefox builds… It was a confusing time. I experimented heavily. Eventually I began to fall in love with Camino. It had the tenderness of real mac app, but also the certain flare of being open source and dangerous like Firefox.
When I upgraded to Leopard, it was back to square one. I went with Safari for a while because Camino was struggling with 10.5. Then Firefox 3 came around with its hype and fancy Smart Location Bar. I fell back into my old ways. I was using a PC at work, Firefox felt right, cutting edge, customizable, fun.
Since then I’ve not settled. I can’t decide. I’m switching weekly. Nobody has exactly everything I want. Here is where I stand now:
Safari 3
- I love to use cmd-1, cmd-2, etc for links on the bookmarks bar
- You cannot set Google Reader as your default feed reader
- In general, works fine, but
- is boring
Safari 4 beta
- “Smart Address Field”, similar to Firefox’s Smart Location Bar
- Top tabs, makes sense.
- Developer Tools are very cool
- Top Sites? Yuck!
- Chokes here and there
- Especially in Wordpress
- And with the Tumblr bookmarklet: when I use a keyboard shortcut to open, in my case cmd-1 because it is first on my bookmarks bar, it opens into a new tab instead of a new window. Very frustrating.
Camino
- Uses cmd-1, etc for bookmarks bar
- Uses Keychain to save passwords
- Feels very at home in OS X
- But buttons suck in Leopard
- Some sites still reject Camino
- Buttons fixed for Leopard
- Del key no longer works for going back a page
- Finally has draggable tabs
- No smart location bar, which I’ve become very comfortable using
Firefox 3
- No keyboard shorcuts for the bookmarks bar
- Doesn’t use Keychain to save passwords, which is very annoying
- One million awesome extensions
So I have no idea what to do. I was using Firefox for the last month, but last week I went back to Safari. It is hard to choose. What are you feelings? Do you have such trouble deciding?
I frequent a handful of forums, and most of my favorites use Vanilla. Vanilla is great because the first view you see is a list of all recent discussions instead of categories, which is nice because it is only one click to read a thread rather than two or more. Also, the objective of Vanilla is to be a minimalist forum, not many default features, very fast, very extensible. Because Vanilla is very basic by default, it is fun to customize. I use it for Nice.
These screenshots are of some really nicely designed forums that I like. They are used as support and bug reporting for different services. Similarly, I use a Vanilla powered forum to manage freelance work and other projects.
Anyhow, use Vanilla, it is cool. Use it.
Over the last two days I moved Existential Media from Movable Type to WordPress MU. Here is the process I followed to achieve this.
- Create new blog in Wordpress.
- Create the new author in Wordpress.
- Export posts from Movable Type blog.
- Import posts into WordPress blog.
- Move Movable Type blog files to WordPress blog files directory.
- Have Movable Type generate a .htaccess file to redirect old posts to new posts.
Redirect 301 /merde/ http://existentialmedia.org/merde/
Redirect 301 /merde/<$MTArchiveDate format="%Y/%m"$>/<$MTEntryTitle dirify="1" trim_to="30"$>/ http://existentialmedia.org/merde/<$MTArchiveDate format="%Y/%m"$>/<$MTEntryTitle encode_url="1"$>/ - Run sql find and replace to update links to files like images, mp3s, etc.
update wp_2_posts set post_content = replace(post_content, 'http://existentialmedia.org/merde/', 'http://existentialmedia.org/merde/files/merde/')
I’ve been liking Movable Type less and less lately. A lot of the problems stem from it being written in perl and performance issues related to that (I assume). I’ve been looking at different ways to make Existential Media work better (faster) and be more stable. I’ve done some optimizing lately of Movable Type and my templates (as far as I can with my know-how), but it hasn’t helped terribly. I’ve looked at different hosts and hosting plans, but there is always cost to consider, as well as effort it takes to move to a new host. So in the short term it looks like we are sticking with Movable Type and Dreamhost.
I’ve started to look at this problem and set long term goals. Although I have learned a lot about Movable Type and although it would be a pain to learn a new platform, I’ve been “shopping” around. I’ve looked at Textpattern, which though I like a lot, wouldn’t be good at handling something like Existential Media. It works better to power one site / one blog. Managing users and permissions and blogs seems like it would not be fun. There is also ExpressionEngine, but there is the problem of cost, so that’s a no go. I’m getting to the point now. I’ve been heavily considering using Drupal. Drupal is what is used to power the Onion’s website. I installed it and have been tinkered around with it for a last couple days. So far so good I guess. There is a huge learning curve. It’s a whole new deal. I don’t really know how to come at it just yet. And they focus on being easy on the resources, which is also a good thing. I’ve also looked at Wordpress MU, which is what they use to power wordpress.com. It might be exchanging one problem for another, but Wordpress is very fast and pretty. I’ve more or less decided to go with Wordpress (that is, unless Movable Type is rewritten in PHP or something). Also, the most recent version of Wordpress was designed by Happy Cog, which is pretty cool.
At first I thought heavily about going with Drupal, but I decided against it. Although it would work, Drupal doesn’t have blogging first in mind, it is a full featured CMS. I also was having trouble getting to know it. Before I decided against it though, I started writing this post. So I’ve modified it. Here is my original game plan for Drupal:
I have to figure out how this all works. I need to “port” my themes over to Drupal. I need to move all the data too. There is a Typepad/Movable Type convertor, but I’m not sure exactly how it will work. There is a list of things I can’t figure out just yet and I thought it would be good to present here.
- Giving a user a blog: I’m a little confused about this. I want it to be like it is now. I give Laura a blog named ladyparts and it has a certain design. And the content does not get intermixed with the rest of the site. I’m not really clear how to manage “blogs” yet. A project that I’ve been looking at is Drupal MU. This solves the problem of having a different theme for each blog. Somethings I’m confused about though. Like does the blog name always have to be the same as the user’s? (Like “Laura’s Blog” … existentialmedia.org/laura)
- Having many users to one blog: I’m not really clear on how this would work. Thinking about WIWT, how can I have a blog named “What I Wore Today” and have the url (/today) and have different users post to it? Is this possible?
- I need to figure out how to have a list of the most recent posts on the homepage with the blog colors, but that might come once I figure out the other things.
But since we probably won’t be using Drupal, there is no need to worry anymore about that. Here is why I like Wordpress.
- It is easy to manage, and although it is very different than Movable Type, I felt at home almost right away. It has the same idea of blogs and users, and trying out the import feature it imported all the posts and comments on my blog flawlessly.
- I did need to install one plugin right away to embed youtube, vimeo, etc which isn’t the most ideal. But was painless.
- Wordpress is very fast because it is written in PHP. I like this part a lot. No more rebuilding! I plan on installing one of the caching plugins too so we shouldn’t have any problems.
- The only reason we aren’t there yet is that I have to figure out the templates. It looks to be not that hard, but will take some time. I want to make the templates more easily customizable and this seems possible to do with Wordpress themes.
Do you have any questions? Fears? Knowledge to impart on this subject? I would really like to be in communication with everybody as much as possible on this.
I’ve been really interested in organizing all my email messages. But I don’t really want to go through every single message to do that. Today I tried to make some filters in Gmail to at least get some general organization.
First I attempted to get all money related emails into one place.
To do this I looked for all the email addresses of my banks, student loans, online buying/selling, that kind of stuff. At first I was getting every address, but I realized it would be much faster to grab whole domains. So this is what I did.
from:(@cems.wamu.com OR @ebay.com OR @amazon.com OR @wellsfargo.com OR @mint.com OR @checkout.google.com OR @paypal.com OR billing@dreamhost.com)
Then I wanted to try and organize emails with attachments by file type.
For images
Has the words:(.jpg OR .jpeg OR .gif OR .png) has:attachment
For media
Has the words:(.avi OR .mov OR .mp3 OR .m4a) has:attachment
For documents
Has the words:(.pdf OR .doc OR .docx OR .xls OR .xlsx OR .ppt OR .pptx OR .oo3) has:attachment
For design
Has the words:(.ai OR .psd OR .indd OR .qxd) has:attachment
The one problem that I’ve run into so far with this is with PDFs. About half of the pdf emails are related design. This is also a problem with Fireworks PNGs.
This is by no means complete. It is only a quick stab at email organization. Hence “ongoing.” If you have any ideas on how to improve this or any filters you’ve set up that work well, comment.



