Welcome to Delicate template
Header
Just another WordPress site
Header

Phusion Passenger & mod_rewrite

July 5th, 2011 | Posted by Michaël in Blog - (0 Comments)

I noticed through Google Webmaster Tools that there where still some old links around on the internet pointing to non-existing pages on my company site. So I thought is was time to redirect them to some existing pages.

The quickes way was creating a .htaccess file and that would be it. But for some reason, the redirects went all wrong. At first, I didn’t thought of it, but I had this problem before.

My Passenger installation is configured with PassengerHighPerformance set to On . With the high performance set to on, Passenger get a bit less compatible with the Apache modules as stated in their documentation. So the only thing I needed to do is the the PassengerHighPerformance to off for that particular vhost.

Hopefully, I won’t forget the next time it happens

For the Dutch version, visit my Dutch blog

Small update on the TimeMachine & Network Drive setup. Since I have a new MacPro, I wanted to enable TimeMachine on it. Note that this install is a fresh Snow Leopard installation, and that my MacBook is a Leopard.

I took the steps as I discribed them myself, but it seemed that TM was still trying to create a new sparsebundle instead of using the newly created on.

If you are using Snow Leopard, keep these things in mind:

  • The naming of the sparsebundle file needs to be a tad diffrent. No more use of the MAC address in the filename. You can just use <computername>.sparsebundle
  • One important step to follow is the fact that TimeMachine is now looking for a file called com.apple.TimeMachine.MachineID.plist
    . This file needs to reside inside the sparsebundle directory.
  • So fire up terminal and go to /Volumes/<volumename>/<computername>.sparsebundle
  • open up vi (name the file com.apple.TimeMachine.MachineID.plist and add the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.backupd.HostUUID</key>
    <string>YOURUUIDHERE</string>
</dict>
</plist>

NOTE: Replace COMPUTER UID with the UUID of your MAC. You can find it under the System Profiles on the Hardware tab. Now fire up TimeMachine and everything should be running smooth again.

Snow Leopard Apache vhosts

December 13th, 2009 | Posted by Michaël in Blog - (0 Comments)

Ok, while setting up my working environment, I had to define vhosts for the sites/applications I’m working on. So here is how I configured Apache.

sudo vi +/'# Virtual hosts' /etc/apache2/httpd.conf

This command will open the httpd.conf file and set the cursor at the first line where he encounters the string # Virtual hosts. Now, you could remove the comment block so that Apache would use only one configuration file for all your vhosts, but I find that a bit dirty. I prefer 1 file per vhost. So I added the following line:

Include /private/etc/apache2/extra/vhosts/*.conf

Now, lets set the logging correct. I like the error logs to look like error.log, see the notices and have a custom logformat. So set the following entries like this:

ErrorLog "/private/var/log/apache2/error.log"
LogLevel notice
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined

So now Apache will load all vhost files located under /private/etc/apache2/extra/vhosts ending with a .conf. But watch out, the folder “vhosts” doesn’t exists yet, so you will have to create it!

sudo mkdir /private/etc/apache2/extra/vhosts

Ok, next step is to create the a vhost. In this example, I’ll make a vhost for phpMyAdmin. Create a config file in the newly create vhost folder (phpmyadmin.conf) en insert the following content:

<VirtualHost *:80>
        DocumentRoot /Users/michael/Sites/phpMyAdmin/
        ServerName phpmyadmin.local
        ErrorLog "/private/var/log/apache2/phpmyadmin.error.log"
        CustomLog "/private/var/log/apache2/phpmyadmin.log" combined
</VirtualHost>

Since the phpmyadmin.local url doesn’t exist, we have to tell our system that it is a local url and that no DNS lookup is required. Edit /etc/hosts file to add the url.


127.0.0.1 phpmyadmin.localNow, just restart Apache and surf to the url :)

My Mac Pro Early 2009 Octo-core

December 13th, 2009 | Posted by Michaël in Blog - (2 Comments)

After I got a MacBook from work last year, I realy enjoyed working with OSX. Everything ran smooth, the user interface is polished and I could still do everything I did on Linux and Windows. But a notebook is still a notebook. The screen is not optimized to do heavy programming work (13″) so I always hooked up an external monitor at work or at home. But then came the time that I needed more screen space. One option was to use an external box to hook up more montors like the Matrox TripleHead2Go , but that had its limitations.

So I decided to treat myself to a brand new Mac Pro. Before the final purchase step, I had to make some decisions on the configuration.

The first thing I had to chose from was the CPU: Quad-core vs Octo-core. So I looked at the 2.93 Ghz Quadcore and then at the 2x 2.66 Ghz Quadcore. Now everybody knows that all new CPU’s are already too fast for most of the applications we use. Even today, most applications still don’t use all the posibilies of all the cores a CPU has, and are even not optimized for it. Even the price diffrence wans’t that big between my Quad-core 2.93 and the 2x 2.66Ghz configuration. So what to do!

After looking a bit further, I wanted to upgrade the RAM to 8Gb (4x2Gb). The Quad-core can go up to 16Gb, while the Octo-core goes up to 32Gb. I know that at this point, I have enough with 8Gb, but you never know what the future brings. So I started to look a bit further. When I buy the Quad-core version, and put 4x2Gb in it, all my slots will be used and it would cost an additional 225€. The only solution I have then is to buy bigger RAM. But when you looked at the prices, my hart just stopped pumping.  For the Quad-core version, an upgrade to 3x4Gb RAM runs up to 1215€ and 4x4Gb even up to 1665€. Those prices are just crazy!

So I looked back at the Octo-core version. For 8Gb (4x2Gb), the additional cost is only 90€ . Ok, the bigger RAM is as pricy as its Quad-core equivalent: 6x2Gb / 270€, 8x2Gb / 450€, 8x4Gb / 3330€. I wanted to stick with the 4x2Gb to begin with, but like I said, you never know what the future brings. With the Octo-core version, I still had 4 empty RAM slots, so if I wanted to, I could always upgrade myself, I put in 4 extra RAM modules of 2Gig, which are still affordable.

So that disicion was made, I would buy the Octo-core with 8Gig to start with. Next was the HDD. Well, I staid with the default 640Gb SATA drive, becouse I’m planning to upgrade to an SSD next year. Didn’t need a RAID card either (using TimeMachine for backups).

Ok, next in line is the graphic card. I knew the default Nvidia GeForce 120 512Mb card sucks big time. But I kept it anyway in this configuration. BUT, I also bought the ATI Radeon HD 4870 512Mb separately. Why in gods name I did that huh? Wel, like I said, I needed more screenspace ;) .

And farther down the configuration, I bought one superdrive, 1 Magic Mouse, 1 Apple Keyboard, 1 Air-port extra WIFI card and the Apple Care Protection Plan. I ended up with a bill of 3776,10€ .And no, I’m not a Mac fanboy or have enough money. Working in IT, a computer system is an important working tool for me, but also a hobby. I work hard for my money, but I do like to treat myself to something nice once and a while.

Becouse of some problems with the supply of Magic Mouses, it took 5 weeks before I received my order!

MacPro Tower

MacPro Tower

Radeon

Radeon Graphics card

CPU

CPU block

Monitors

Monitors

One of the main reasons I switched to Mac was the fact that the user interface is polished and I still maintain the power and freedom I find Linux. But one downside in Mac Terminal is that there is no standard syntax highlighting.

So here is some info how I got to enable some basic syntax highlighting in Terminal and VIM. Note that these settings are user specific and not system wide.

Fire up Terminal and create a .vimrc file in your home directory.

cd
vim .vimrc

Edit/create /usr/share/vim/vimrc for system wide settings.

Press the ‘i‘ key to switch vim to Insertion Mode, then enter these lines
set ai                  " auto indenting
set history=100         " keep 100 lines of history
set ruler               " show the cursor position
syntax on               " syntax highlighting
set hlsearch            " highlight the last searched term
filetype plugin on      " use the file type plugins

" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if ! exists("g:leave_my_cursor_position_alone") |
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif |
\ endif

Press the Escape key to take vim out of Insertion Mode, then press ‘:‘ (colon) followed by ‘x‘ to save the file and exit. Now when you list a directory or edit a file through vi(m) you’ll see that all syntaxes are highlighted.

Long live VI(M)!!

Leading from the front

September 19th, 2009 | Posted by Michaël in Blog - (0 Comments)

Keep this in mind:

In any group, the person on top consciously or unconsciously sets the tone. If leaders are fearful, hesitant to take any risks, or overly concerned for their ego and reputation, then this invariably filters its way through the entire group and makes effective action impossible. Complaining and haranguing people to work harder has a counterproductive effect. You must adopt the opposite style: imbue your troops with the proper spirit through your actions, not words. They see you working harder than anyone, holding yourself to the highest standards, taking risks with confidence, and making tough decisions. This inspires and binds the group together. In these democratic times, you must practice what you preach.

50 Cent’s 10 Lessons for Business Success

Almost new year

September 3rd, 2009 | Posted by Michaël in Blog - (0 Comments)

Most western people use the Gregorian calendar to determine when a new year starts.  Like most of my friends now, I’m a bit of the chart. For me, a new year starts after my summer holiday, so that makes it pretty variable.

But I have a good, simple reason to do this. As most of you, I go on vacation abroad. A total new environment, hopefully nice weather and just nothing (or almost nothing) to worry about. This gives me the time to reflect on all things that happend during the year.

The past year a you have read in my previous post has been hectic.  Almost to the border of becoming unpleasant.  So the main red line during  my “spiritual quest” will be

  1. My daytime job : how to deal with the growing workload
  2. My side project (Netronix): getting back on the rails
  3. Sports: not that I haven’t been doing any sports, but just not as much as I wanted
  4. Taking time off: when to take some time for my own without worrying about work stuff

When I look at these 4 points, one thing pops in my mind: time management. That will be big ugly mythical monster to defeat next year. But I know that I will fail. Nobody can defeat this creature. The only thing you can do I develop a way to live with it a peacefully as possible.

I think when you can get your time management right, all the other things just fall in place. So we will see how it gows. Hopefully I can get find a way to get the harmony back in my life.

Tips and experience are welcome. Going to wrap this up. It took me almost 2 hours to write this little post, so this means that I’m in desperate need to recharge my good old batteries!

For love of the game

July 3rd, 2009 | Posted by Michaël in Blog | ICT - (0 Comments)

Some people tell me I’m crazy for working most of the time. Running my own small company and working a full time job. Sometimes, I have to admit they are right. When I sit in front of my computer I totally lose sense of time. I just get wrapped up in problems that need to be solved and trying to absorb more knowledge. For some, that might be geeky, for me its fulfilling and a way to earn more respect amongst my pears.

But lately I’ve been struggling with some ideas. It’s almost 4 years since I started my own business during college and I’m still operating on the same level. Business is growing but not in a noticeable way. I’m still a strong believer that you don’t have to start a business by just quitting your daytime job  and giving yourself a tight deadline to make you project work.

You can still succeed by working on your project at the beginning or the end of the day. Instead of getting up at 8, get up at 7. Instead of sleeping in during the weekends ’till noon, wake up at 9. Instead of hanging in front of the tv during the evening, get some work done. And instead of going to sleep at 10, go to bed at 11. I know it might sound crazy, but getting those few extra hours really give you the chance to accomplish more in one day then you might think. So why am I unable to accomplish my own goals?

Having a day time job also comes with responsibilities. The more you get involved to more responsibility you have to take, the more responsibility you have to take, the heavier your workload.
But thats not all. Before you can accomplish your goal you need one thing: ideas. Not that don’t have any ideas, on the contrary. At this point, I started working on 4 projects, witch isn’t really healthy. As a result of working on 4 different projects at the same time, work goes slower then it would when you would work on 1 project.(I even put one project in the fridge and considering starting it all over again with a whole new concept).

Working on one project at a time gives you the possibility to finish your project quicker and get it launched on a first draft. People would get to know you project and give feedback. In the meantime when you are waiting for feedback, you can just start working on the second one, and so on.

Guess I need to take a few steps back and just reflect a bit more on what I want to achieve. I have to admit, I’ve been working like crazy the past year, but I just can’t help it. Trying to accomplish great things often comes with sacrifices  (to some degree of course)  and you can only accomplish them when you feel really passionate about what you do.

So the next step will be thinking about a new strategy to get back on top of things!

I had a small problem on my Mac when I wanted to rebuild a subversion repo. When I worked on windows, I just searched the project folder for .svn folders.

But on Mac and Linux, thats another story. Thankfully for the commandline, one quick command, and the problem is fixed:
find . | grep .svn$ | xargs rm -rf

My beauty is back

November 14th, 2008 | Posted by Michaël in Blog - (0 Comments)

It has been a while since I posted some new content on this blog. Not that I don’t have enything to share, but it is just a very hectic period for me. And it doesn’t look like there will be any change soon.

But there is one thing I can share now. I recently got my Triumph Spitfire 1500 back. And with a nice paint job.

Here are some pictures:

Car Side

I allready finished rewiring the whole car. Next thing up is installing the new overdrive gearbox, but it has been longer then half a year since I ordered it, and still it hasn’t arrived. The supplier promised me that it would arive this period, so fingers crossed.

After the gearbox is installed, I can rebuild the new interior, and the car will be ready to go :)