Misty thoughts

19May/090

Me

As part of my 365 project, here is the first picture of me. Plan to make one every week.Me

Tagged as: , No Comments
18May/090

A photo a day for a year

The sun reflecting on the Hooglandsekerk as seem from Aharale & Geiske's window

The sun reflecting on the Hogelandsekerk as seen from Aharale & Geiske's window

A few days ago I came upon this idea and I really liked it. Each day, one photo, with one or two sentences, for a whole year. It helps you remember each and every day in that year, while making you a better photographer. I found this picture to be a good starting picture.
Yesterday I was feeling down about loosing two ships in Eve-online Today, I am celebrating this world, and starting on what I believe to be a great experiment in living.

Tagged as: , No Comments
4May/092

Installing Apache2, PHP5 and MySQL5 on OS X Tiger

Tiger comes bundled with Apache 1.3 and PHP4. While these are still used for web development they are defenetly on the way out. For this reason I have decided to set up a more up to date MAMP installation on my old Powerbook G4. While this was all done on Tiger, it will most likely also work on Leopard.

Preparations

The installation process follows mostly the unix standard. That means that you will want to have the a /usr/local folder made. If you do not have it yet, type the following in terminal:

sudo mkdir /usr/local

The advantage of using local is that whenever a system updates itself it leaves local alone. If you install directly into /usr/bin, there is a chance that a system update will overwrite your installed software with its own update. If you lost me by now, you are probably off downloading a MAMP binary now.

The first step is to retrieve the packages we will need to properly install MAMP. To keep it nice and organized make a folder that will contain the source code, if you do not yet have a designated folder.

mkdir ~/src

We can now start installing MAMP

Installation

MySQL

The first thing that will be installed is MySQL. You can get the latest dmg here. After installing MySQL from the dmg, I also recommend installing Sequelpro if you want a GUI interface to the database. For building MySQL yourself from source check this.

Apache2

Apache comes bundled with OS X. Note that the control panel will only affect the default installation. Starting and stopping your own Apache installation will need some command line work, or some scripting. The following installs Apache 2 into /usr/local/sbin/apache2, if you prefer to install into another folder change the prefix to that folder.

curl -O http://apache.hippo.nl/httpd/httpd-2.2.11.tar.gz
tar xvzf http-2.2.11.tar.gz
cd http-2.2.11/
./configure --prefix=/usr/local/sbin/apache2 --enable-modules=all --enable-mods-shared=all
make
sudo make install
cd ..

Before we continue to build PHP there are some extra libraries that are needed. If you are not interested in building PHP with GD you can probably skip most of them.

Freetype

A Free, High-Quality, and Portable Font Engine. You can learn more about it here.

curl -O http://mirrors.zerg.biz/nongnu/freetype/freetype-2.3.9.tar.gz
tar xvzf freetype-2.3.9.tar.gz
cd freetype-2.3.9/
./configure
make
sudo make install
cd ..

JPEG

Support for jpeg image format

curl -O http://www.ijg.org/files/jpegsrc.v6b.tar.gz
tar xzf jpegsrc.v6b.tar.gz
cd jpeg-6b/
cp /usr/share/libtool/config.sub .
cp /usr/share/libtool/config.guess .
./configure --enable-shared
make
sudo make install
cd ..

Libpng

Support for png image format

curl -O ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.36.tar.gz
tar xjf libpng-1.2.36.tar.gz
cd libpng-1.2.36/
./configure
make
sudo make install
cd ..

openSSL

Install the latest version of openSSL

curl -O http://www.openssl.org/source/openssl-0.9.8k.tar.gz
tar xvzf openssl-0.9.8k.tar.gz
cd openssl-0.9.8k
./config --prefix=/usr/local --openssldir=/usr/local/ssl
make
sudo make install
./config shared --prefix=/usr/local --openssldir=/usr/local/ssl
make clean
make
sudo make install

PHP

Now that the extra libraries are available we can continue to build PHP. We choose to install it into /usr/local/php5. As before if you wish to install into a different location, change the prefix.

curl -O http://de3.php.net/distributions/php-5.2.9.tar.bz2
tar xjf php-5.2.9.tar.bz2
cd php-5.2.9/
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/sbin/apache2/bin/apxs --with-config-file-scan-dir=/usr/local/php5/php.d --with-iconv --with-openssl=/usr/local --with-openssl-dir=/usr/local/ssl --with-zlib=/usr --with-gd --with-zlib-dir=/usr --with-xmlrpc --with-iconv-dir=/usr --enable-exif --enable-sqlite-utf8 --enable-ftp --enable-sockets --enable-dbase --enable-mbstring --with-bz2=/usr --enable-fastcgi --enable-cgi --enable-zip --with-curl --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-libxml-dir=shared,/usr/local/php5 --with-jpeg-dir=/usr/local/php5 --with-png-dir=/usr/local/php5 --with-freetype-dir=/usr/local/php5
make
sudo make install

You should now have a ready development system.

Finalization

To make sure that the newly installed software is used instead of the default installed one make sure that /usr/local and the bin and php5 folders within are in the path before /usr/bin.
To start the Apache server use the following command:

sudo /usr/local/sbin/apache2/bin/apachectl start

Use stop and restart to stop or restart the server.

Credit

This article is inspired by the following three great guides:
Compiling Apache and PHP (and MySQL) on Mac OS X Leopard
Apache 2 + PHP 5 + MySQL 4 under OS X 10.3.9
Installing Apache, MySQL and PHP on Leopard

4Mar/090

Some humor

While I am working on a longer post, I wanted to post some amusing stuff I came across these last few weeks


And finally some good office humor
Tagged as: , No Comments
27Jan/090

Weekend in London

London has always been one of my favorite cities. Just being there makes me feel slightly happier. The street names, lots of them with a meaning of their own like Abbey road, Oxford street, Regent street, Bond street. The known busses, the famous underground sign, the public telephone booths. London is immediately recognizable. This visit had a wonderful bonus of having my parents visiting it at the same time.
Well that, and that the pound is historically low.

darwin-exhibition-home_12310_1.jpg

The year 2009 marks two hundred years to the birth of Darwin and a hundred and fifty years since he published his theory of evolution. The Natural History Museum had a special exhibition for this occasion. They did a wonderful job. It follows the path that Darwin took, starting as a young scientist leaving aboard the HMS Beagle on a five year trip all the way to his death. It shows his finding, items he has used to collect and analyze them and most importantly the whole thought pattern that went in his head. the internal struggle with himself once he realized that the holy text version of creation is wrong. It is sometimes hard for us to imagine but up to 150 years ago the bible version was the version.

The museum in itself is wonderful. It covers pretty much all known life from dinosaurs through fish and bird to mammals and humans. Since museums are now free in England a lot of families go there. It gives the museum a living feeling that is wonderful, especially in a museum that is about life. I highly recommend visiting it if you get to London

The other museum that I really enjoyed was the TATE modern. Located in an old power plant building it is a fitting setting for a modern art museum. The exhibitions varied quite a lot so there was something there for everyone. And again, as an open museum there was a wonderful feeling of living art, instead of observatory art.

Not that it was all culture. We spent a whole day shopping. Working our way from Piccadilly circus through Regent street to Oxford circus and then on to Oxford street. At the end of which we went to Soho for some good beer.

London was a pleasure, as it was expected as it always is. We didn't get to do half as much as we wanted to, which means we will be coming back. As far as I am concerned sooner is better then later.

Tagged as: , No Comments
15Jan/090

How I ended up disliking religion by being with religious people

Let me start by saying I am not a religious person. I did not have a religious upbringing, even though I was at a religious kinder garden, and I do not believe in the existence of god. Or gods.

These last six months I have been working with, almost exclusively, quite religious people. Since I work at the IT branch this is something that is note worthy. Most IT people I know are not religious. Some of them believe in the existence of a god, others don't, but I would definitely not classify them as religious. However, as I stated, I found my self in a team in which I was pretty much the only non believer. Coming from Israel, religion has always been something that is there. Though I am not a believer, I always thought that there is a lot of good coming from all these people. You could say my disposition towards religious people was positive.

I now have a strong dislike towards anyone that is considering himself religious. and let me tell you why.

In the first few weeks I was completely fascinated by these people. My friends are not religious, neither are my parents. You could say I grew up with little direct influence from any sort of religion. I do realize a lot of the traditions I was raised with come from the Jewish belief, however they were, at least for me, nothing more than that. A tradition.

And here I was surrounded by this group of true believers. We talked about faith, about why they believe, about what they see and how they experience the world. All 4 of them (note: 3 Christians and 1 Muslim) renounce evolution. I got answers like "Are you a dog?" and "I do not come from an ape". And that was about all the proof they had. That was all the proof they needed. Well that and the holy scripts. It bothered me that I could not get through with rational thoughts to these people. Yet at the time I did not know quite why I was so bothered by this. I noticed I slightly shifted from being slightly positive to getting angry with them. Here was a group of people who are capable of thinking, that at some trail of thoughts completely lost touch with logic. That transaction was making me frustrated and angry. why is this happening? Why can they be perfectly logical one minute then completely break with logic the other. They brought up their arguments, I blew them away with pure and simple logic and so we always ended up with two things:

1. God's plan is impossible for us to understand, or Gods way are mysterious, or things that to us seem illogical or impossible are actually logical and possible to a God.

2. I just know it is, or, it says so in the bible.

And that was that. There is nothing to be brought against those arguments because they are just like "because". No logic, no thinking, no reason, just "because". After a few of these talks I started to see what was making me so upset. It was that these, otherwise intelligent people were CHOOSING to see it like that. For the life of me I could not understand why anyone would want to do it. Then again if I could I would probably be a religious person. That was when the last shift was starting to happen in my attitude towards them. I moved from getting angry at them to feeling sorry for them. And then it finally hit me. The difference between how they think and I think.

I look at the world, and then shape my ideas of it

They have their ideas, then shape the world so that it would fit.

And that was that. These people, and this is the worst part, by their own choice are blind to the world. They know for sure how everything is, it is for them just a matter of interpreting everything in a way that matches their idea of how the world is. I now understand how people can do all the terrible things that they do in the name of religion. They do not see it as terrible things. I am actually convinced some of them see it as a good thing. A just thing. My colleges think that being gay is a choice, and that its bad, because it says so in the holy bible. I'm serious.

So now all I do is feel pity for them. They have chosen a path that was a bad idea in the middle ages, let alone in modern time. At the same time I am growing anti-religious by the minute. Look at the conflicts we have in the world now. Look at how many of it is religious based. What's that you say, "Religion is just an excuses given to the masses". Maybe, possibly. However, remove that excuses and it becomes a lot harder to get so many people to do so many horrible things. Religion might be misused, but if it is, than it has been for centuries. Maybe its time we realized that the only way to stop making religion an excuse is to reduce its power so that it can't be used as such. Think I am being to harsh, look at the world map again, think of the conflicts that are going on now in the world.

How many are not religion related?

How many are?

Exactly

I rest my case.

Last note. There is still hope. Every generation there are more of us thinking people, and less of then bling people. One day, relgion will be a marginal group. That will be a good day.

6Jan/090

Skatboarding at slow motion

This was captured at 120fps. Looks really amazing.

26Sep/080

Django and static files

After a long break I have resumed my side project in django. Last night I came upon a problem. When testing a page outside django, the page was rendered correctly. When it was rendered through django the javascript files were not located.

At this point I have to admit I was a bit fullish and forgot to look at the web server's log to see if the files were correctly served. that was an hour and a half of trying to figure out why the javascript functions were not found. So after smartening up I found out that the javascript files were not found. It seemed that django kept looking for them in the wrong location. Using the example here I eventually got it all to working.

It comes down to this. in the settings.py file there is a reference to the media URL and to the file system path to the media directory. Adding the following code to the urls.py

if settings.DEBUG:
urlpatterns += patterns('',
(r'^tripcalc/media/(?P
.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
)

Will make sure that while django is in debug mode, serving of the static files will be done via django. for production sites it is better to let a dedicated web server (such as Apache) serve these static files.
And that took care of it. I can now continue with the development. And it also enabled me to call the CSS file, so style is also shown. hurray.

12Sep/080

Riding Gravity

Two guys, skateboards and a big hill. "Lets ride some gravity".

11Sep/080

Fair Politics

Politics is not fair. I am aware of that. That said, watching the republican's party campaign is enraging. Trying to win an election is good. Spreading lies, miss information and idea-as-facts is not. Not to mention playing the media. CBS did a check on Palin's speech. It was taken offline after 30 min. Long live google cache.

Also this site, which can be very misleading as to who exactly is behind it.

And finally the truth about thetax.

Update:

It seems there is also an application "Barakbook" now, which "helps you keep up to date with all of Barak's friends". As you can guess, they are all elitist powerful, corrupt anarchists. All of them. How low can you go?

Tags

80s 365 american election animation apache coding cognitive cool daily show diving django dreamhost drupal extreme form api fun gaming guide humor ideas it London Me music mysql php programming python religon science skateboard sport spyware switzerland theming thinking thoughts travel usa presidentail election vacation video video clips web web development youtube