8 Jan 2011

Getting started with lithium

This is guide to getting started with lithium php web framework.

First, we need to create initial directory structure:

mkdir frameworks && cd frameworks
git clone code@dev.lithify.me:lithium.git
cd ..
mkdir lithiumapp && cd lithiumapp
cp -pR ../frameworks/lithium/app .
ln -s ../frameworks/lithium/libraries libraries

Afterwards, configure apache host (don’t forget to restart apache):

<VirtualHost *:80>
    ServerName lithiumapp.local
    DocumentRoot "/PATH/TO/lithiumapp/app/webroot"
</VirtualHost>

And finally, edit hosts file:

127.0.0.1   lithiumapp.local

Go to lithiumapp.local in your browser. If all went well, you should see screen with lithium default generated html.

3 Sep 2010

Yamaha xvs1300

Dsc00073
1 Sep 2010

SproutCore from git

By looking at sproutcore wiki, it was not obvious, how to install sproutcore from git as a global preference and not per project like in wiki. There is only one small change to wiki instructions, in order for this to work. Instead of creating frameworks folder in each project, and cloning sproutcore repository into it. You, only need to do it in the main abbot folder. These are instructions from wiki with a small change:

git clone git://github.com/sproutit/sproutcore-abbot.git abbot
cd abbot && mkdir frameworks && cd frameworks
git clone git://github.com/sproutit/sproutcore.git sproutcore
cd ../..
abbot/bin/sc-init hello_world
31 Aug 2010

Custom Harley

Dsc00072

1 Aug 2010

Ruby and Python are brothers

Recently, I came across an interesting blog post : http://blog.ksplice.com/2010/07/learning-by-doing-writing-your-own-traceroute...

It was interesting to see high level implementation of a utility tool, that usually implemented in C. After looking into it, I thought : this code can be copied into Ruby and it will work !! (well, except some syntax changes). With this thought in my mind, I engaged into very difficult task of copy pasting :) after some specific socket handling in Ruby, result looks very similar to Python original.

You can see it here : http://github.com/artiom/traceroute/blob/master/traceroute.rb

Running result for google.com looks like this :

$ sudo ruby traceroute.rb 
1       84.243.198.1 (84.243.198.1)
2       core1.ams.net.google.com (195.69.144.247)
3       209.85.248.93 (209.85.248.93)
4       72.14.233.114 (72.14.233.114)
5       209.85.255.143 (209.85.255.143)
6       209.85.255.130 (209.85.255.130)
7       ey-in-f104.1e100.net (74.125.79.104)
8       ey-in-f99.1e100.net (74.125.79.99)
9       ey-in-f147.1e100.net (74.125.79.147)

 

9 Jul 2010

RSS is a toy !!

(download)

8 Jul 2010

Spain vs Germany

Dsc00047

8 Jul 2010

Uruguay vs Netherlands

Dsc00044

4 Jul 2010

Pimp my ride, bike style

Dsc00036