Friday, February 27, 2009

date() and creating common format log entries
I had to create an log in common format
and the problem was to insert the date for it something like "26/Feb/2009:16:09:08"
this is how is done in php date("d/M/Y:H:m:s");
the rest was easy copy pasted from another log
Ubuntu developer responses -

It's upstream problem or
let's find a cool name for ubuntu release

I'm just joking ,they have no time with 5-A-day


http://www.eviljaymz.com/files/whypeopleseemtohavefreetime.png

Wednesday, February 25, 2009

Beer and Travel facts about Romania

Tuesday, February 24, 2009

Pulse + skype delay issues in jaunty

If i talked with someone on skype 2.0.x on linux with another skype on ubuntu it worked ok without dealy
if the target was using skype on windows (new version) then my skype introduced delays it seems

the only way to make it work ok for us was to remove pulse audio



killall pulseaudio
sudo aptitude remove pulseaudio
sudo aptitude install esound
sudo aptitude remove /etc/X11/Xsession.d/70pulseaudio



now the cpu is working ok at 80% on this dell vostro , also watching the video
before was 100% with large delay for the remote target

Monday, February 23, 2009

building qt4.5 on jaunty

$ dget -x http://ftp.de.debian.org/debian/pool/main/q/qt4-x11/qt4-x11_4.5.0~rc1-2.dsc
$ cd qt4-x11-4.5.0~rc1/
$ debuild -i

I was missing some packages (check what you need on your system)
$ sudo apt-get install cdbs libcups2-dev libdbus-1-dev libiodbc2-dev libmng-dev libpam0g-dev libreadline5-dev libsqlite0-dev libtiff4-dev libxmu-dev libxslt1-dev libphonon-dev

$ debuild -i

$ ls -1 *.deb
libqt4-assistant_4.5.0~rc1-2_i386.deb
libqt4-core_4.5.0~rc1-2_i386.deb
libqt4-dbg_4.5.0~rc1-2_i386.deb
libqt4-dbus_4.5.0~rc1-2_i386.deb
libqt4-designer_4.5.0~rc1-2_i386.deb
libqt4-dev_4.5.0~rc1-2_i386.deb
libqt4-gui_4.5.0~rc1-2_i386.deb
libqt4-help_4.5.0~rc1-2_i386.deb
libqt4-network_4.5.0~rc1-2_i386.deb
libqt4-opengl_4.5.0~rc1-2_i386.deb
libqt4-opengl-dev_4.5.0~rc1-2_i386.deb
libqt4-qt3support_4.5.0~rc1-2_i386.deb
libqt4-script_4.5.0~rc1-2_i386.deb
libqt4-scripttools_4.5.0~rc1-2_i386.deb
libqt4-sql_4.5.0~rc1-2_i386.deb
libqt4-sql-ibase_4.5.0~rc1-2_i386.deb
libqt4-sql-mysql_4.5.0~rc1-2_i386.deb
libqt4-sql-odbc_4.5.0~rc1-2_i386.deb
libqt4-sql-psql_4.5.0~rc1-2_i386.deb
libqt4-sql-sqlite2_4.5.0~rc1-2_i386.deb
libqt4-sql-sqlite_4.5.0~rc1-2_i386.deb
libqt4-svg_4.5.0~rc1-2_i386.deb
libqt4-test_4.5.0~rc1-2_i386.deb
libqt4-webkit_4.5.0~rc1-2_i386.deb
libqt4-webkit-dbg_4.5.0~rc1-2_i386.deb
libqt4-xml_4.5.0~rc1-2_i386.deb
libqt4-xmlpatterns_4.5.0~rc1-2_i386.deb
libqt4-xmlpatterns-dbg_4.5.0~rc1-2_i386.deb
libqtcore4_4.5.0~rc1-2_i386.deb
libqtgui4_4.5.0~rc1-2_i386.deb
qt4-demos_4.5.0~rc1-2_i386.deb
qt4-designer_4.5.0~rc1-2_i386.deb
qt4-dev-tools_4.5.0~rc1-2_i386.deb
qt4-doc_4.5.0~rc1-2_all.deb
qt4-doc-html_4.5.0~rc1-2_all.deb
qt4-qmake_4.5.0~rc1-2_i386.deb
qt4-qtconfig_4.5.0~rc1-2_i386.deb


now i have the webkit for building arora and ibase library to access firebird

Sunday, February 22, 2009

Adding compression to javascript files , css for an A grade in performance

Here is the example for nginx but it can be done the same for an apache configuration

gzip_min_length 1000;
gzip_types text/html text/plain text/css text/javascript application/x-javascript text/xml;

gzip module usually is on but it must be configured as above

one smart thing to do is to precompress your javascript files and css ones


Friday, February 20, 2009

I propose an End Of Life Date for all IE browsers
DEC 31 2009

I'm little bit too optimistic but we can start with ie6 then 7 in 2010 and then ie 8 in 2011
also we can add an javascript to blogs so that message should be shown if browser is ie

Thursday, February 19, 2009

nginx seems to be popular at wordpress

here is why : it's an very fast load balancer and is easy to use
practical guide to using nginx loadbalancer - Step 1

In this guide i will show you how to use nginx as an load balancer for php sites running on apache

You can see the old article where i describe the basic idea

I suppose nginx+apache are already installed and working
apache by default is on port 80 nginx on my machine is on port 8087 (by default is on 80 but i moved to 8087)




What is next ? Step one is to test nginx as an proxy for apache and to be an accelerator for static content
apache is to slow on that area , and nginx/lighty are small and blazing fast
replace any 80 port in apache with 8000
grep -r 80 /etc/apache2

and wherever you see 80 in port.conf or virtual host please replace with 8000

hen i have created the proxy config
sudo vi /etc/nginx/sites-enabled/proxy


server {
listen: 80;
server_name: foobar.example.com;
location / {
proxy_pass http://foobar.example.comt:8000;
}
}

restart both apache and nginx

and you should load the local websites and test if they are ok

Next we will add an rule so that all images / javascript /css will not be proxied but served by nginx
erver {
listen 80;
server_name www.foobar.example.comt;
# serve static files
location ~ ^/(img|images|javascript|js|css|flash|media|static)/ {
root /var/www;
# expires 30d;
}
location / {
proxy_pass http://www.foobar.example.com:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}


So now we have fast serving for images and php is served by one apache
Next we will add more apache servers and do some tests


Tuesday, February 17, 2009

two weird instant messanging services

try to change the password from web on icq.com
you can't

also let's see the phun on jabber.org
i can't really use the jabber.org website - no usability

Update:
i found the change password in the pigdin's Accounts Menu



I wonder why the password change is not in the accounts -> Manage accounts -> modify

I also expected to use the jabber.org to change my password or create an new user
because of an my old phpbb account i thought that is safe and sure to reset all of my passwords on all
sites i visited , is good and healty even if i don't have the same password anymore :)

my digital trace :

it all started with an email account at uttgm.ro (mapopa)
then an free email at email.ro (mapopa)
after a while i used icq.com
now i have several gmail accounts : mapopa, and for work popamariusadrian
I have hi5.com account also i have facebook account and of course linkedin and orkut




ubuntu launchpad page

Thursday, February 12, 2009

root password on android g1 dev phone aka dream

seems that all you need to do on this unlocked phone is to install an terminal emulator , then
do an simple su
with no password

what is next ?
i wait for r33 update so i can have google latitude or seach by voice
more useful would be gtalk with voice or skype with voice

also i think i will install the debian in paralel on it , so i can play with firebird/nginx/php
http://www.saurik.com/id/10

Wednesday, February 11, 2009

openkomodo seems to be pretty and with the nice dark colors

with eclipse i have to fight an long way to find the dark theme
also it is happy only if you have 1g or more of ram

openkomodo seems to be an good alternative for editing jscript, html , php or python





kompozer returs with 0.8 version


I have tested a little to work with div and images and is quite stable
I also imported the webpage of firebirdsql.org to see how well it works and seems
that it did an good job , it looks like is made with an lot of table elements :)




buffer_get_ret: trying to get more bytes 4 than in buffer 0

that is an strange error , i had to remove my .ssh directory and now i can ssh to localhost

Tuesday, February 10, 2009

reea.net launched an new website with beautiful views from Targu -Mures

http://vederi.inmures.ro/

I was just missing that town , now that I'm in Boston
I was reading sed tutorials over the net and I almost forgot about sed -i option
to replace and save the file in the same time

http://spiralbound.net/2007/12/12/php-and-sed-for-string-substitution


I need it to replace some files , maybe it could be done in php more elegant
but later

also json_encode and decode function are really fun
for me , I have an . file where I save the values in json format and then get them in array format
for php

Thursday, February 05, 2009

it seems that there are some issues with setting dual desktop display on my dell vostro system , i can't make it use an big screen and not mirror mode in 4.2 , it worked perfectly on an nvidia system with dual display

howto install ubuntu studio theme

sudo apt-get install ubuntustudio-look

then choose the theme in system -> preferences - > appearance -> Ubuntu studio

Then in customize theme and choose window border (the minimize/maximize buttons looks the same and i usually change them to dark room - more sane)