Saturday, December 08, 2012

This is why recommend Debian instead of Ubuntu




Ubuntu provides specific repositories of nonfree software, and Canonical expressly promotes and recommends nonfree software under the Ubuntu name in some of their distribution channels. Ubuntu offers the option to install only free packages, which means it also offers the option to install nonfree packages too. In addition, the version of Linux, the kernel, included in Ubuntu contains firmware blobs.


Ubuntu's trademark policy prohibits commercial redistribution of exact copies of Ubuntu, denying an important freedom.


As of October 2012, Ubuntu sends personal data about users' searches to a server belonging to Canonical, which sends back ads to buy things from Amazon. This does not, strictly speaking, affect whether Ubuntu is free software, but it is a violation of users' privacy. It also encourages buying from Amazon, a company associated with DRM as well as mistreatment of workers, authors and publishers.


This adware is one of the rare occasions in which a free software developer persists in keeping a malicious feature in its version of a program.

Sunday, November 18, 2012

My first successfull LibreOffice build 4.0

This is my first successfull LibO build from source  on my Debian sid laptop (it took a while to get all set and waiting for the copile to finish)

After all finished i started it

with make dev-install

/home/mariuz/work/libo/solver/unxlngx6.pro/installation/opt/program/soffice &




Thursday, November 15, 2012

Firebird 2.5.2 stable for all Ubuntu releases is uploaded into ppa



I recommend Ubuntu 12.04 LTS or 14.04 LTS
http://www.firebirdnews.org/?p=7981

The other are builded OK but with some modifications to the Debian scripts

I give some examples of modifications for Lucid and Hardy in the

debian scripts area
http://jimicompot.blogspot.ro/2012/11/firebird-252-for-ubuntu-lucid-is.html

http://jimicompot.blogspot.ro/2012/11/firebird-252-on-ubuntu-hardy.html

Hardy it will be EOL soon in April so for the next Firebird release it

will be skipped

(it doesn't support the quilt 3.0 format and and is hardest to build for )

The older the Distro the harder it it is to build the software for it .

Sunday, November 11, 2012

Lazarus FreePascal IDE on Raspberry PI

I have installed the version from debian respository

sudo apt-get install lazarus-ide fpc


The install and developing process is the same like on any Debian machine
I have started the ide over the ssh

ssh -X pi@192.168.1.104
lazarus-ide



I have the Firebird components i can start doing Database apps like on any desktop






Using Lazarus IDE with Firebird in Ubuntu and Debian

Install the ide
sudo apt-get install lazarus-ide
Start the ide from the console/terminal

 lazarus-ide &
If everything went well you'll see a new tab called SQLdb. This tab will contain two components a TSQLConnection and a TSQLQuery.








SQLdb tab also contains a component TIBConnection that you can place it on the form


We will connect to /var/lib/firebird/2.5/data/employee.fdb
On the form put an TIBConnection, TSQLTransaction,TSQLQuery,TDatasource and an TDBGrid









TIBConnection is configured to have DatabaseName=/var/lib/firebird/2.5/data/employee.fdb
Password=masterkey
Username=sysdba
and Transaction=SQLTransaction1
You can put it to be Connected = True




Then configure SQLTransaction1
to use

Database=IBConnection1
Active =True;




Configure TSQLQuery this way

Database:IBConnection1
SQL=select * from employee;
Active = True;








Configure TDatasource
DataSet=SQLQuery1



Configure TDBGrid

DataSource = DataSource1




Next you can put an button and make them active from run time


procedure TForm1.Button1Click(Sender: TObject);
begin
SQLQuery1.Active:=true;
end;









Wednesday, November 07, 2012

Debian and raspberry pi = love , a small ARM Firebird super server

I have installed debian on my raspberry
here is the login and cpu info

ssh pi@192.168.1.104
pi@192.168.1.104's password: 
Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

NOTICE: the software on this Raspberry Pi has not been fully configured. Please run 'sudo raspi-config'

pi@raspberrypi ~ $ cat /proc/cpuinfo 
Processor : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : swp half thumb fastmult vfp edsp java tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7

Hardware : BCM2708
Revision : 000f
Serial  : 000000008c86c7c9

First thing i search in a debian is the firebird packages
 apt-cache search firebird
falconpl-dbi-firebird - Firebird SQL database abstraction layer for Falcon P.L
firebird-dev - Development files for Firebird - an RDBMS based on InterBase 6.0 code
firebird2.5-classic - Firebird Classic Server - an RDBMS based on InterBase 6.0 code
firebird2.5-classic-common - common files for firebird 2.5 "classic" and "superclassic"
firebird2.5-classic-dbg - collected debug symbols for firebird2.5-classic and -superclassic
firebird2.5-common - common files for firebird 2.5 servers and clients
firebird2.5-common-doc - copyright, licnesing and changelogs of firebird2.5
firebird2.5-doc - Documentation files for firebird database version 2.5
firebird2.5-examples - Examples for Firebird - an RDBMS based on InterBase 6.0 code
firebird2.5-server-common - common files for firebird 2.5 servers
firebird2.5-super - Firebird Super Server - an RDBMS based on InterBase 6.0 code
firebird2.5-super-dbg - collected debug symbols for firebird2.5-super
firebird2.5-superclassic - Firebird SuperClassic Server - an RDBMS based on InterBase 6.0 code
flamerobin - graphical database administration tool for Firebird DBMS
libdbd-firebird-perl - Perl DBI driver for Firebird RDBMS server
libdbi-perl - Perl Database Interface (DBI)
libfbclient2 - Firebird client library
libfbembed2.5 - Firebird embedded client/server library
libib-util - Firebird UDF support library
libwtdbofirebird-dev - Firebird backend for Wt::Dbo [development]
libwtdbofirebird32 - Firebird backend for Wt::Dbo [runtime]
php5-interbase - interbase/firebird module for php5

What is next ? installing firebird 2.5 super server of course
sudo apt-get install firebird2.5-super
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  firebird2.5-common firebird2.5-common-doc firebird2.5-server-common libfbclient2 libib-util
Suggested packages:
  firebird2.5-doc
The following NEW packages will be installed:
  firebird2.5-common firebird2.5-common-doc firebird2.5-server-common firebird2.5-super libfbclient2 libib-util
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,300 kB of archives.
After this operation, 12.8 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main firebird2.5-common-doc all 2.5.2~svn+54698.ds4-1 [636 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main firebird2.5-common all 2.5.2~svn+54698.ds4-1 [95.7 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libfbclient2 armhf 2.5.2~svn+54698.ds4-1 [223 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libib-util armhf 2.5.2~svn+54698.ds4-1 [3,814 B]
Get:5 http://mirrordirector.raspbian.org/raspbian/ wheezy/main firebird2.5-server-common armhf 2.5.2~svn+54698.ds4-1 [488 kB]
Get:6 http://mirrordirector.raspbian.org/raspbian/ wheezy/main firebird2.5-super armhf 2.5.2~svn+54698.ds4-1 [1,853 kB]                             
Fetched 3,300 kB in 13s (238 kB/s)                                                                                                                  
Preconfiguring packages ...
Selecting previously unselected package firebird2.5-common-doc.
(Reading database ... 57783 files and directories currently installed.)
Unpacking firebird2.5-common-doc (from .../firebird2.5-common-doc_2.5.2~svn+54698.ds4-1_all.deb) ...
Selecting previously unselected package firebird2.5-common.
Unpacking firebird2.5-common (from .../firebird2.5-common_2.5.2~svn+54698.ds4-1_all.deb) ...
Selecting previously unselected package libfbclient2:armhf.
Unpacking libfbclient2:armhf (from .../libfbclient2_2.5.2~svn+54698.ds4-1_armhf.deb) ...
Selecting previously unselected package libib-util:armhf.
Unpacking libib-util:armhf (from .../libib-util_2.5.2~svn+54698.ds4-1_armhf.deb) ...
Selecting previously unselected package firebird2.5-server-common.
Unpacking firebird2.5-server-common (from .../firebird2.5-server-common_2.5.2~svn+54698.ds4-1_armhf.deb) ...
Selecting previously unselected package firebird2.5-super.
Unpacking firebird2.5-super (from .../firebird2.5-super_2.5.2~svn+54698.ds4-1_armhf.deb) ...
Processing triggers for man-db ...
Setting up firebird2.5-common-doc (2.5.2~svn+54698.ds4-1) ...
Setting up firebird2.5-common (2.5.2~svn+54698.ds4-1) ...
Setting up libfbclient2:armhf (2.5.2~svn+54698.ds4-1) ...
Setting up libib-util:armhf (2.5.2~svn+54698.ds4-1) ...
Setting up firebird2.5-server-common (2.5.2~svn+54698.ds4-1) ...
adduser: Warning: The home directory `/var/lib/firebird' does not belong to the user you are currently creating.
Setting up firebird2.5-super (2.5.2~svn+54698.ds4-1) ...
Created default security2.fdb
[ ok ] Firebird 2.5 super server not running.
[warn] Not starting Firebird 2.5 super server ... (warning).
[warn] Use `dpkg-reconfigure firebird2.5-super' to enable ... (warning).
So let's enable Firebird super server
pi@raspberrypi ~ $ sudo dpkg-reconfigure firebird2.5-super
[ ok ] Firebird 2.5 super server not running.
[ ok ] Starting Firebird 2.5 super server...done.
[ ok ] Firebird 2.5 super server already running.
Yes it's on
ps axu | grep firebird
firebird  2830  0.0  0.1   4528   796 ?        S    19:18   0:00 /usr/sbin/fbguard -daemon -forever -pidfile /var/run/firebird/2.5/fbserver.pid
firebird  2832  0.2  1.0  62444  4540 ?        Sl   19:18   0:00 /usr/sbin/fbserver

Still got 256m of free memory for nginx , php , or something better a node.js experiment Let's create/use a database and see simple firebird at work
sudo apt-get install firebird2.5-examples firebird-dev
cp /usr/share/doc/firebird2.5-common-doc/examples/empbuild/employee.fdb.gz
gunzip employee.fdb.gz
sudo chown firebird.firebird employee.fdb
mv employee.fdb /var/lib/firebird/2.5/data

isql-fb
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect "/var/lib/firebird/2.5/data/employee.fdb " user 'SYSDBA' password 'masterkey'
CON> ;
Database:  "/var/lib/firebird/2.5/data/employee.fdb ", User: SYSDBA
SQL> 
show tables;
       COUNTRY                                CUSTOMER                       
       DEPARTMENT                             EMPLOYEE                       
       EMPLOYEE_PROJECT                       JOB                            
       PROJECT                                PROJ_DEPT_BUDGET               
       SALARY_HISTORY                         SALES                          


SQL> show version;
ISQL Version: LI-V2.5.2.26508 Firebird 2.5
Server version:
Firebird/linux ARM (access method), version "LI-V2.5.2.26508 Firebird 2.5"
Firebird/linux ARM (remote server), version "LI-V2.5.2.26508 Firebird 2.5/tcp (raspberrypi)/P12"
Firebird/linux ARM (remote interface), version "LI-V2.5.2.26508 Firebird 2.5/tcp (raspberrypi)/P12"
on disk structure version 11.2
SQL> 
SQL> create database "/var/lib/firebird/2.5/data/first_database.fdb" user 'SYSDBA' password 'masterkey'
CON> ;
Commit current transaction (y/n)?y
Committing.
SQL> connect "/var/lib/firebird/2.5/data/first_database.fdb" user 'SYSDBA' password 'masterkey';
Commit current transaction (y/n)?y
Committing.
Database:  "/var/lib/firebird/2.5/data/first_database.fdb", User: SYSDBA
SQL> CREATE TABLE TEST (ID INT NOT NULL PRIMARY KEY, NAME VARCHAR(20));
SQL> show tables
CON> ;
       TEST                            
SQL> INSERT INTO TEST VALUES (1, 'John');
SQL> INSERT INTO TEST VALUES (2, 'Joe');
SQL> select * from test;

          ID NAME                 
============ ==================== 
           1 John                 
           2 Joe                  

SQL> 


Later i will try firebird c api examples
cd /usr/share/doc/firebird2.5-common-doc/examples/api 
cp *.gz ~/
chown pi.pi *.gz
cd ~
gunzip *.gz
gcc -L/usr/lib -lfbclient -I/usr/share/doc/firebird2.5-common-doc/examples/include/ api1.c
ISC_USER=SYSDBA ISC_PASSWORD=masterkey ./a.out /tmp/new.fdb
Created database '/tmp/new.fdb'.

Successfully accessed the newly created database.
So all it works as it should without errors and at the speed of pentium 2 like system or even faster I love the small server and i can leave it on 24x7 without the need to think too much for the energy costs
Next i have tested the firebird python driver fdb
sudo apt-get install python-pip
 

pip install fdb
cat test.py
con = fdb.connect(dsn='/var/lib/firebird/2.5/data/employee.fdb', user='sysdba', password='masterkey')

cur = con.cursor()
SELECT = "select * from employee"



# 2. Equivalently using fetchall():
# This is potentially dangerous if result set is huge, as the whole result set is first materialized
# as list and then used for iteration.
cur.execute(SELECT)
for row in cur.fetchall():
    print 'ID:%d Name %s.' % (row[0], row[1])


python test.py
....
ID:141 Name Pierre.
ID:144 Name John.
ID:145 Name Mark.

Next on my testing list is compiling the node.js (doing it rightnow) and the pure JavaScript Firebird driver with an express demo Update : compiling node is done here are my results

Tuesday, November 06, 2012

TopDAY: Drupal Meetup in Târgu Mureș


Great PHP local event will take place in Târgu Mureș, in November 8: TopDAY - Drupal Meetup. The event is focusing on short presentations about Drupal and is supported by Reea
Details:

Saturday, November 03, 2012

Upgrading from ubuntu 12.10 to debian sid

A good idea is to install a light desktop manager like lxdm or xfce so at least you have a DM in case
gnome will not work out

Install debian keyring http://packages.debian.org/sid/all/debian-archive-keyring/download


modify /etc/apt/sources.list
delete all the lines and
add these ones 

deb  http://http.debian.net/debian/ sid main contrib non-free
deb-src  http://http.debian.net/debian/ sid main contrib non-fre


apt-get update
apt-get -f -o Dpkg::Options::="--force-overwrite" upgrade


there will be a lot of issues and it might bring your  machine unbootable
So be prepared with a testing debian stick or cd

Make a list with packages removed by the dist-upgrade
in my case i have noticed that network manager will be removed

apt-get -f -o Dpkg::Options::="--force-overwrite" dist-upgrade

From the removed packaged i picked the critical ones that i know i need and i download them before to start the upgrade so i can install them with dpkg -i


Here is my list that i needed on my system (that i know that are critical to me and to make the system functional)
apt-get  install --download-only network-manager network-manager-gnome lxde modemmanager ssh openssh-server alsa-utils anacron at


Here are some of the issues that could happen while upgrading the machine there are many dpkg-new files in the /etc/init.d/ folder so here are some tips bellow

Init scripts and networking system
Get rid of upstart first. I had problems with sysv-rc and needed to force reconfiguration. Some init scripts were installed with "dpkg-new" in the name, I had to rename them. As with X, I tried few solutions, this is distilled but stil redundant version:
dpkg-reconfigure sysv-rc
cd /etc/init.d
mv acpid.dpkg-new acpid
mv anacron.dpkg-new anacron
mv atd.dpkg-new atd
mv cron.dpkg-new cron
mv dbus.dpkg-new dbus
mv module-init-tools.dpkg-new module-init-tools
mv procps.dpkg-new procps
mv rsyslog.dpkg-new rsyslog
mv udev-mtab udev
apt-get --reinstall install base-files ifupdown initscripts netbase sysv-rc sysvinit sysvinit-utils






Saturday, October 13, 2012

People still use Pascal? yes and is Growing


Free Pascal and  Delphi/ OO Pascal is growing that is what Tiobe says : if you add them both it should be in the top 10 programming languages displacing Ruby and JavaScript 
1.097+0.839=1.936
Another more credible source is the downloads page on sourcefogre for the Lazarus IDE

We assist on Libre Pascal Renascence of Hacker culture that they don't care about corporate languages like C#/Java

Why ? because Pascal is Modern and insanly Fast and it does have it's own advatages compared with other languages. 
Here are advatages in using the modern Pascal http://www.freepascal.org/advantage.var
I have written my own rants here , feel free to comment
The trend is for typed and more readable languges TypeScript , Python , Ruby ...

Wednesday, October 03, 2012

Installing Firebird Active Record driver for Ruby

Here is how to install activerecord-fb-adapter for rails
using the the gem version

gem install activerecord-fb-adapter
Fetching: fb-0.7.*.gem (100%)
Building native extensions.  This could take a while...
Fetching: activerecord-fb-adapter-0.7.*.gem (100%)
Successfully installed fb-0.7.*
Successfully installed activerecord-fb-adapter-0.7.*
2 gems installed
That is all You can build it manually if you wish
git clone https://github.com/rowland/activerecord-fb-adapter.git
cd activerecord-fb-adapter
rake gem

ls -lah pkg/activerecord-fb-*

gem install pkg/activerecord-fb-adapter-*.gem 

Successfully installed activerecord-fb-adapter-0.7.*
1 gem installed
Successfully installed 

gem install rails 
So now we are ready to play with Rails on Fire

Update:Rails works with this driver and here is the Rails guide

Sunday, September 30, 2012

Meet Compton - compozite manager for Lubuntu with shadows, transparencies and smooth transitions Installing it on Ubuntu 12.04

In Lubuntu 12.10 You can have shadows, transparencies and smooth transitions in your windows and programs thanks to Compton, the new composite manager in town. It's a fork from xcompmgr-dana (which is a fork istelf from xcompmgr). Thanks to our pals at Crunchbang Linux, we can use the GIT versions on Lubuntu too.


Download your 32bit or 64bit version and try it while it's hot. Combine it with your favourite dock or whatever. And this program solves the problem that Lubuntu 12.10 users may have with other composite managers, like Cairo or XCompMgr. You can check the screenshot to see it's really beautiful, but I can sure you that it's really fast too!

To install it on Lubuntu 12.04 you need to get the libconfig9 from 12.10
The wallpaper is from here 
http://sostopher.deviantart.com/gallery/?catpath=/&offset=24#/d1wuxjo

Friday, September 28, 2012

#Perl #Firebird driver DBD-Firebird 1.11 is released with utf-8 and other bugfixes

On the behalf of the developers and contributors team, I'm pleased to announce that DBD::Firebird v1.11 , a DBI driver for the Firebird RDBMS server is released.
This release brings many changes and bugfixes .

* Test::Exception is required 
* On freebsd Threaded perl is required you have to re-install perl from ports and you have to select the config option that says 'build a perl with threads'
* Test database to use UTF8 charset and enable UTF8 for the connection
* Fix CHAR lenght when using multi-byte character set Fixes Github Issue #32 (RT#76506)
* additional debug when finishing already finished statement
* avoid double destroying of statement in auto-commit mode with DDL Fixes Github Issue #30 (RT#72946)
The development is done on GitHub And the mailing list is here
Thank you,

Wednesday, August 01, 2012

following twitter users at once from ruby

You need to create a new twitter application on dev and create a callback url for it

you can start with the code from twitter-app https://github.com/jnunemaker/twitter-app

clone it with git  , and then run
bundle install to have all the requirements in your rvm

Then create a button for it or a text box where you insert one user that you want to follow
and for each follower for one user you can add it to your list of followers after you aprove the app






I have added twitter.local in hosts also in domains anyware
and the callback is

http://twitter.local:3000/sessions/callback

More documentation for follow is here
http://rubydoc.info/gems/twitter/3.4.1/Twitter/API:follow

Tuesday, July 31, 2012

Converting sylpheed filters to claws

Download from the claws tools area filter_conv_new.pl

http://www.claws-mail.org/tools.php

Install libxml-simpleobject-per

sudo apt-get install libxml-simpleobject-perl

then unzip it and run it


perl filter_conv_new.pl
Converted 12 filters


Now the filters should apear in the sylpheed Filtering configuration area


Perl is great :)

Thursday, July 26, 2012

Enabling spamassassin in claws email

I was using sylpheed  so i have decided to enable local scanning for this i needed to upgrade the email client to claws mail (it does have the sa scanning plugin)

so first remove the sylpheed , then install claws email
sudo apt-get install claws-mail
then install the sa plugin

claws-mail-spamassassin


next step is to enable the spamd daemon

in /etc/default/spamassassin

enable
ENABLED=1


sudo /etc/init.d/spamassassin restart

Next load the plugin in the email client


and then configure it to use the local daemon

You can see it at work by marking sad figure over the emails with spam
I have created a filter to move them to Trash folder


Monday, July 16, 2012

Why amazon ec2 is better than heroku : it's the price

Compared with a ronin database instance = 200$

For 57.6$ per month if we calculate month=30 days on ec2 i can get a small ubuntu linux instance with 1.7G of ram with a lot more than 10.000 rows

http://aws.amazon.com/ec2/instance-types/

After that installing a firebird database can be easy if i choose a ubuntu instance

Next you can add nginx/django just for fun

For backup there are many python scripts to backup to s3/ebs snapshots

Friday, July 13, 2012

forum.ubuntu.ro is one of the most popular support forums in Romania



  • forum.ubuntu.ro is one of the most popular support forums in Romania with 23576 users and 129521 posts. (6369 users and 65895 posts in mid 2010).
  • huge spikes in traffic on www.ubuntu.ro every 6 months when a new Ubuntu version is released. More than 5800 hits when 12.04 launched.
http://i.imgur.com/ejK1i.png 

Romanian Team roadmap 
  • Continue improving Ubuntu translations and documentation, together with offering support via forum.ubuntu.ro
  • Take part in all major Romanian FLOSS event - next one will be FLOSS Camp 2012 (http://camp.softwareliber.ro/2012/)
  • Contribute with local organizations promoting free software and technologies in education.

More info on the ReAproval page



http://i.imgur.com/0VKK9.png

Thursday, July 05, 2012

FLOSSCamp Romania - Jul 26 - 29 / Brasov, Romania

 Help spread the word, and if you can, and you are there, is worth to participate, you will have a good time and meet great people.


Google plus events page 


And the site with the info about travelling 
http://camp.softwareliber.ro/2012/


Saturday, June 23, 2012

Linux-0.01 kernel building on ubuntu hardy

linux-0.01-rm-3.5 now builds ok on hardy but only on 32 bit version
The best way to try is to install hardy , or debian lenny in kvm-linux or virtualbox and then try the instructions bellow 

Official 0.0.1 project news and downloads are located here

You might need some packages first
$sudo apt-get install bin86 kvm qemu gcc build-essential


$wget http://ftp.be.debian.org/pub/linux/kernel/people/abdel/linux_0.01/sources/linux-0.01-rm-3.5.tar.gz

$tar -zxvf linux-0.01-rm-3.5.tar.gz
$cd linux-0.01-rm-3.5
$make

or time make

make[1]: Leaving directory `/home/mariuz/linux-0.01-rm-3.5/lib'
ld -s -x -M -Ttext 0 -e startup_32 boot/head.o init/main.o \
kernel/kernel.o mm/mm.o fs/fs.o \
lib/lib.a \
-o tools/system > System.map
(echo -n "SYSSIZE = (";stat -c%s tools/system \
| tr '\012' ' '; echo "+ 15 ) / 16") > tmp.s
cat boot/boot.s >> tmp.s
as86 -0 -o boot/boot.o tmp.s
00286 /*
00287 * This procedure turns off the floppy drive motor, so
00288 * that we enter the kernel in a known state, and
00289 * don't have to worry about it later.
00290 */
00286 /*
00287 * This procedure turns off the floppy drive motor, so
00288 * that we enter the kernel in a known state, and
00289 * don't have to worry about it later.
00290 */
rm -f tmp.s
ld86 -0 -s -o boot/boot boot/boot.o
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -fno-stack-protector \
-o tools/build tools/build.c
#chmem +65000 tools/build
objcopy -O binary -R .note -R .comment tools/system tools/system.bin
tools/build boot/boot tools/system.bin > Image
Boot sector 452 bytes.
System 89732 bytes.

real 0m4.512s
user 0m3.696s
sys 0m0.768s

then rename Image to linux0.01-3.5.img
qemu -hdb hd_oldlinux.img -fda linux0.01-3.5.img -boot a

you must use the hd image from here if you don't have it yet
wget http://draconux.free.fr/download/os-dev/linux0.01/Image/hd_oldlinux.img.zip
unzip hd_oldlinux.img.zip


Monday, June 18, 2012

PHP GD Bundled - Compilation Instructions for Ubuntu 12.04

I needed to recompile the gd in ubuntu 12.04 to work with gd bundled version Warning i don't use mysql but only firebird so your requirements may vary
  1. Open up a terminal.
  2. Become root by typing su and enter your root password when prompted.
  3. Download some packages we'll need for the install. Type apt-get install build-essential debhelper fakeroot dpkg-dev firebird2.5-dev 
  4. Change your current directory to your source one. cd /usr/src.
  5. Download the PHP 5 source code by typing apt-get source php5.
  6. We also need the PHP 5 dependencies. To download these, enter apt-get build-dep php5.
  7. Go into the downloaded PHP directory. cd php5-XXXX. just press after you've typed php5- to complete the folder name.
  8. Now we need to edit a config file to change it into the bundled version of GD. Type  editor debian/rules. (I have removed any reference to mysql in the cofigure lines )
  9. Locate the line that says --with-gd=shared,/usr --enable-gd-native-ttf \ and change it to --with-gd=shared --enable-gd-native-ttf \ by removing ,/usr. (Press ctrl+w to find something, if you search for gd, it is near the second occurrence). To save the file, we need to press ctrl+x then press y and then enter.
  10. Now we've done setting up we now need to compile it. Type dpkg-buildpackage -rfakeroot -d
  11. When it's done, you should have a load of .deb files in the parent directory. Find the one starting with php5-gd.
  12. Install it by double clicking on it, or from the terminal, type dpkg -i php5-gdXXXXXXX just press after you've typed php5-gd to complete the file name.

Sunday, June 10, 2012

Building Doom3 GPL code on #Ubuntu #Lubuntu 64 bits


As you might now doom3 source code is now open sourced
and it can be studied and forked and improved on github
https://github.com/TTimo/doom3.gpl
Here are the instructions to build it on Lubuntu / Debian sid 64

You might need the doom3 data from your legal sources :)
http://www.cyberciti.biz/faq/linux-install-doom3-game/


sudo apt-get install scons

apt-get install ia32-libs libc6-dev-i386 lib32gcc1 gcc-multilib  lib32stdc++6 g++-multilib lib32z1-dev

apt-get install libopenal-dev
apt-get install
apt-get install libglu-dev


apt-get install libX11-dev:i386 libXext-dev:i386 libxxf86vm-dev:i386

ln -s /usr/lib32/libz.a /usr/lib/libz.a

git clone https://github.com/TTimo/doom3.gpl.git

cd doom3.gpl
cd neo

scons NOCURL=1


build/debug/core/sys/scons/doom
DOOM 1.3.1.1304-debug linux-x86 Nov 26 2011 20:21:11
found interface lo - loopback
found interface wlan0 - 192.168.1.103/255.255.255.0
found interface virbr0 - 192.168.122.1/255.255.255.0
no 'base' directory in exe path /home/mariuz/work/doom3.gpl/neo/build/debug/core/sys/scons, skipping
no 'base' directory in cwd path /home/mariuz/work/doom3.gpl/neo, skipping
WARNING: using hardcoded default base path
------ Initializing File System ------
Current search path:
/home/mariuz/.doom3/base
/usr/local/games/doom3/base
game DLL: 0x0 in pak: 0x0
Addon pk4s:
file system initialized.
--------------------------------------
Unknown command 'vid_restart'
idRenderSystem::Shutdown()
Sys_Error: Couldn't load default.cfg

To build the doom3 with curl support there is already a pull request with the curl m32 fix
Update : The m32 curl fix is already applied



Building Linux Kernel 3.X.X-RC-X with an php script on Debian / Ubuntu

Install the prerequisite packages
$ sudo apt-get install kernel-package php5-cli git-core fakeroot ncurses-dev
$ sudo su
# git clone git://github.com/mariuz/kernelcompile.git
# cd kernelcompile
# php rc-kernel-compile.php
if all is ok you will be asked for kernel build option (menuconfig) (they are copied from your system config) after you have chosen the menu you can press exit and the build will continue and it will start compiling using all your available cpus

Here is what i usually change on the menu

Enable Preemptition Model for Low Latency (near realtime)

Processor Type and Features> Preemptiton Model (Preemtible Kernel(Low-Latency Desktop))

Please disable Xen

Processor Type and Features -> Paravirtualized Guest Support -> Xen

Proccessor Type and Features -> Timer frequency (1000HZ)
this is a for a desktop system

The latest deb package for kernel will be in /usr/src
you need to install it with

# dpkg -i linux-image*

Wednesday, June 06, 2012

upgrading from ubuntu 12.04 to debian testing or sid

A good idea is to install a light desktop manager like lxdm or xfce so at least you have a DM in case
gnome will not work out

Install debian keyring http://packages.debian.org/wheezy/all/debian-archive-keyring/download


modify /etc/apt/sources.list
delete all the lines and
add these ones 
deb http://ftp.us.debian.org/debian sid main contrib
deb-src http://ftp.us.debian.org/debian sid main contrib

apt-get update
apt-get -f -o Dpkg::Options::="--force-overwrite" dist-upgrade


there will be a lot of issues and it might bring your  machine unbootable
So be prepared with a testing debian stick or cd

Here are some of the issues that could happen while upgrading the machine there are many dpkg-new files in the /etc/init.d/ folder so here are some tips bellow

Init scripts and networking system
Get rid of upstart first. I had problems with sysv-rc and needed to force reconfiguration. Some init scripts were installed with "dpkg-new" in the name, I had to rename them. As with X, I tried few solutions, this is distilled but stil redundant version:
dpkg-reconfigure sysv-rc
cd /etc/init.d
mv acpid.dpkg-new acpid
mv anacron.dpkg-new anacron
mv atd.dpkg-new atd
mv cron.dpkg-new cron
mv dbus.dpkg-new dbus
mv module-init-tools.dpkg-new module-init-tools
mv procps.dpkg-new procps
mv rsyslog.dpkg-new rsyslog
mv udev-mtab udev
dpkg --purge --force-all base-files ifupdown initscripts netbase sysv-rc sysvinit sysvinit-utils
apt-get --reinstall install base-files ifupdown initscripts netbase sysv-rc sysvinit sysvinit-utils



http://virtually-a-machine.blogspot.ro/2010/09/live-migrating-ubuntu-to-debian-howto.html


Monday, June 04, 2012

The simplest VivaGraphJS graph test


Creating a graph in  VivaGraphJS with webgl

Create a graph with user id edges and for data
By definition, a Graph is a collection of nodes (vertices) and links (also called edges - identified pairs of nodes). In VivaGraph.JS nodes can be any object e.g. a string, a number, a function, another graph or object, and so on.

The graph g can be grown in two ways. You can add one node at a time:
g.addNode('1','User name 1');
g.addNode('2','User name 2');

Now graph g contains two nodes:1and 2. You can also use addLink()method to grow a graph. Calling this method with nodes which are not present in the graph creates them,If nodes already present in the graph 'addLink()' makes them connected
g.addLink('1', '2');

and at the end we add render loop

var renderer = Viva.Graph.View.renderer(g);
renderer.run();

here is the final output when loaded on the onload function for the html page , this is for the two users from above


we can add other nodes for example 3
g.addNode('3','User name 3');
and then create the links between them

g.addLink('2', '3');
g.addLink('3', '1');





Saturday, June 02, 2012

Here is is howto upgrade to the new FDB 0.8.0 driver

 The new driver is released FDB release 0.8.0 is out: http://pypi.python.org/pypi/fdb/0.8.0
 Highlights for this release:
 Support for Firebird Event Notifications (see KInterbasDB documentation for details)
 And as always, some bugs fixed.
 Target for next version: stream BLOB support (necessary for big BLOBs)
 Here is howto update it in ubuntu/debian , i love pip

sudo pip install --upgrade fdb 
Downloading/unpacking fdb
  Downloading fdb-0.8.0.tar.gz (164Kb): 164Kb downloaded
  Running setup.py egg_info for package fdb
    
Installing collected packages: fdb
  Found existing installation: fdb 0.7.2
    Uninstalling fdb:
      Successfully uninstalled fdb
  Running setup.py install for fdb
    
Successfully installed fdb
Cleaning up...

Saturday, May 26, 2012

How php compiles the source code ?

PHP compiles source code into Zend Engine bytecode - this is done by the Zend
compiler in zend_language_scanner.l, zend_language_parser.y and
zend_compile.c. This code is the executed by the opcode engine in
zend_execute.c and zend_vm_execute.h. The latter is generated from
zend_vm_def.h by means of the script zend_vm_gen.php.




For  a good intro to php internals there is a presentation in french 
http://julien-pauli.developpez.com/tutoriels/php/internals/presentation/


I saw it via this thread on php internals 






Thursday, May 24, 2012

Running thin server in development instead of mongrel

need to add to the  Gemfile

gem 'thin', :group => 'development'

then run

$ bundle install

to start it type
$ rails server thin

Tuesday, May 22, 2012

RubyRails for PHP programmers starting points

If you have php code that needs to be converted to ruby/rails there are a few starting points
hyperpolyglot should be your homepage:
http://hyperpolyglot.org/scripting

On the ruby site there is a nice intro on Similarities and Differences.

From Rails for Php Programmers i used this pdf PHP to Rails Reference (extract)
on the translating php cookies and session (params for post/get ...)

Also the PHP to Ruby reference is very good
https://github.com/maintainable/php-ruby-reference

Ps: main site http://railsforphp.com/ seems to be down at the moment but i guess you can fork and build the reference yourself

Saturday, May 19, 2012

Getting the list of friends and their feeds with python open_facebook

I use django facebook api and here is the example i use to list my friends and their feeds

new fdb firebird driver example :execute insert statement

Here is my example for inserting one row in firebird database with fdb python driver


Installing kinterbasdb on Ubuntu Server 12.04 64 bits (python 2.7.3)

 The official way is from svn , otherwise you will get this error

_kiservices.c: In function ‘_init_kiservices_ibase_header_constants’:
_kiservices.c:809:3: error: ‘isc_info_db_impl_isc_a’ undeclared (first use in this function)


Old driver and soon to be deprecated , the recommended way is to use fdb

svn co https://firebird.svn.sourceforge.net/svnroot/firebird/python/kinterbasdb/trunk/ kinterbasdb
cd kinterbasdb

sudo python setup.py install



Connect to firebird using the new python fdb driver

Install the firebird driver (you might need firebird2.5-dev headers)

 pip install fdb

use this documentation link  for the moment


and here is your first connection

Thursday, May 10, 2012

What oracle really wants is

A full rewrite of the Java classees with core api and classes and that is what Microsoft "suffered" with the C# Yes C#/.net combo is a bad rewrite of the Java language with COM api and all the unportable DirectX included https://www.eff.org/deeplinks/2012/05/oracle-v-google-and-dangerous-implications-treating-apis-copyrightable

Friday, April 27, 2012

Timezone offset in seconds php vs ruby

echo date('Z');

10800

and timizone seems to be set right


date_default_timezone_set('Europe/Bucharest');echo date('Z');
10800



and in ruby it gives


Time.zone.now.utc_offset()
 => -25200


seems that rails and php lives in different timzones

so try to use localtimezone and is correct now


l = t.getlocal
 => 2011-06-27 10:10:00 +0300
1.9.2p318 :025 > l.gmt_offset
 => 10800




Monday, April 23, 2012

One way to avoid the Adobe tax

One coleague of mine extracted the layers from psd files with image magick 

I wish gimp could preserve all these layers when you import the psd , or maybe we can do a python plugin that will extract the layers and import them in the the gimp layers

Sunday, April 22, 2012

I love pip install

Here is how easy it is to install fdb firebird driver

pip install fdb
Downloading/unpacking fdb
  Downloading fdb-0.x.x.tar.gz (xxxKb): xxxKb downloaded
  Running setup.py egg_info for package fdb
    
Installing collected packages: fdb
  Running setup.py install for fdb
    error: could not create '/usr/local/lib/python2.7/dist-packages/fdb': Permission denied
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/mariuz/build/fdb/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-8bcPXK-record/install-record.txt:
    running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

creating build/lib.linux-x86_64-2.7/fdb

copying fdb/services.py -> build/lib.linux-x86_64-2.7/fdb

copying fdb/fbcore.py -> build/lib.linux-x86_64-2.7/fdb

copying fdb/ibase.py -> build/lib.linux-x86_64-2.7/fdb

copying fdb/__init__.py -> build/lib.linux-x86_64-2.7/fdb

running install_lib

creating /usr/local/lib/python2.7/dist-packages/fdb

error: could not create '/usr/local/lib/python2.7/dist-packages/fdb': Permission denied

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/home/mariuz/build/fdb/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-8bcPXK-record/install-record.txt failed with error code 1
Storing complete log in /home/mariuz/.pip/pip.log

#Let's use the sudo super cow powers 

mariuz@borki7:~$ sudo su 

root@borki7:/home/mariuz# pip install fdb
Downloading/unpacking fdb
  Running setup.py egg_info for package fdb
    
Installing collected packages: fdb
  Running setup.py install for fdb
    
Successfully installed fdb
Cleaning up...

Monday, April 16, 2012

Firebird remote interface vs direct file access for firebird databases


The scenario it can happen when using firebird classic (see the end of the article) You skip the remote interface (tcp/ip) and access the database directly by typing
isql-fb database path
here is my setup when i try to use the database directly or without password the server is not using the remote interface (There is no remote server/interface in the show version command)

sudo isql-fb /var/lib/firebird/2.5/data/rubyonfire.fdb
Database:  /var/lib/firebird/2.5/data/rubyonfire.fdb

SQL> show version;
ISQL Version: LI-V2.5.2.26466 Firebird 2.5
Server version:
Firebird/linux AMD64 (access method), version "LI-V2.5.2.26466 Firebird 2.5"
on disk structure version 11.2
quit;
check if the server is up with telnet localhost 3050 and then force the tcp ip method to connect using the remote interface use locahost:path 
SQL>connect "localhost:/var/lib/firebird/2.5/data/rubyonfire.fdb" user 'SYSDBA' password '********';

SQL> show version;
ISQL Version: LI-V2.5.2.26466 Firebird 2.5
Server version:
Firebird/linux AMD64 (access method), version "LI-V2.5.2.26466 Firebird 2.5"
Firebird/linux AMD64 (remote server), version "LI-V2.5.2.26466 Firebird 2.5/tcp /P12"
Firebird/linux AMD64 (remote interface), version "LI-V2.5.2.26466 Firebird 2.5/tcp )/P12"
on disk structure version 11.2

Tuesday, April 10, 2012

What you can learn from instagram deal and become a billionare

If you look at the tech behind it:
- use Ubuntu server or debian on amazon ec2 (I guess you can choose your own cloud solution)
- use Django with a shraded relational database (I would chose firebird)
- use nginx with gunicorn or uwsgi
- you use memcache right ?
- for notifications on apple use pyapns , billions of messages are send with it
- create and write a android app
- use gearman
- redis
- scare the hell out of facebook

- profit

Tuesday, April 03, 2012

Rails project bash aliases

To type less in the bash console on my Lubuntu
I use these bash aliases added in ~/.bashrc

Wednesday, March 28, 2012

Lubuntu 12.04 countdown!

The Lubuntu 12.04 countdown is ready

Sunday, March 25, 2012

Migrating to django 1.4

First i have fixed the warnings
[Sun Mar 25 21:15:41 2012] [error]   DeprecationWarning
[Sun Mar 25 21:15:42 2012] [error] /usr/lib/python2.5/site-packages/django/conf/__init__.py:75: DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
[Sun Mar 25 21:15:42 2012] [error]   "use STATIC_URL instead.", DeprecationWarning)
[Sun Mar 25 21:15:42 2012] [error] /usr/lib/python2.5/site-packages/django/core/cache/__init__.py:82: DeprecationWarning: settings.CACHE_* is deprecated; use settings.CACHES instead.
[Sun Mar 25 21:15:42 2012] [error]   DeprecationWarning
so i have deleted the line ADMIN_MEDIA_PREFIX from settings.py and need to configure the "/media" for the admin url also replaced
CACHE_BACKEND = 'locmem://'
with
{
    'default': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
    }
}

Wednesday, February 15, 2012

For people who belive in ORM: Please learn SQL

Here is one example of what happens when django ORM can be optimized
Profiling Django Applications: A Journey From 1300 to 2 Queries

Sunday, February 12, 2012

EC2 is about 10-20 times more expensive than dedicated hosting.

Quote of the day via ycombinator:

Even if reserved instances save us 22% over 3 years, it still doesn't even come close. Reserved instances also force me to commit to using a certain type of EC2 instance for 3 years with lots of money upfront. Moreover, IO is ridiculously bad on EC2 and there's nothing that can be done about it. Even RAIDing a gazillion EBS volumes together doesn't do much. I'm glad the truth about how expensive EC2 really is is starting to come out. Hopefully it will force them to revise their pricing, or at least offer more processing power for the same price.

I ran some benchmarks a few weeks ago that show how expensive EC2 really is

Agreed. Here's a good relevant blog post by mark maunder challenging the "cloud hype"  http://markmaunder.com/2011/10/31/clouded-vision/

Another thing that is overpriced is the memory , here is a quote from the basecamp's next memory cache article (see the comments section)


They have brought 864GB of RAM that looks like below




Total price was $12,000
Compare that with Amazon :Just checked AWS Elastic Cache’s pricing.
It would cost around 20k / month for ~ 800 GB of Memory. (12 * Quadruple Extra Large nodes / 68 GB)

Saturday, February 11, 2012

Ati fglrx gpu blacklisted in latest chrome beta on Lubuntu/Ubuntu 11.10 with the fglrx driver




Although it works just fine if i use to ignore the blacklisting
Tested on two systems with the current drivers and quite new gpus

See bellow

Here are the details
:

Wednesday, February 08, 2012

php shell script that will run runs at specific hour with crontab and send emails with the html form extracted content


Here is how to create a daily crontab script that runs at specific hour 
gets the web content and then saves the output in a file folder (the form must use a sumbit button with post) and then 
it send email with the html file 

you need to install php5-cli , php-pear 
sudo apt-get install php5-cli php-pear

and then from pear Mail , Mail_Mime http://pear.php.net/package/Mail_Mime/redirected

sudo pear install Mail_Mime
sudo pear install Mail

crontab -l

# m h  dom mon dow   command
0 1 * * * /home/ubuntu/curl_cron.php


cat /home/ubuntu/curl_cron.php


Thursday, February 02, 2012

Suhosin is disbled by default in Debian, and soon Ubuntu - i hope

I think is the right aproach 
I don't believe in security by obscurity (this random patch it will secure your php ... riiight)

suhosin shouldn't be a patch it should be inside of php core or as module (think like the selinux situation) , So debian guys are right use the upstream unpatched version , let the core php devels decide if suhosin is right or wrong for them :less bugs , less patches , life is better = more security and fast updates in debian

Did i told you that upstream doesn't test suhosin patch when they run the tests ?
And with that patch php core is not the same , there are some bugs that i found related to it  (in debian/ubuntu) and it happens only when that invasive patch is applied

Wednesday, February 01, 2012

updating passenger in rails and ubuntu 10.3 lts

I had one issue with an old instalation of passenger and nginx (kernel 2.6.32 doesn't quite deliver signals to the nginx 0.8.x)

I download the current dark passenger

wget http://rubyforge.org/frs/download.php/75548/passenger-3.0.11.tar.gz
tar -zxvf passenger-3.0.11.tar.gz
cd passenger-3.0.11/
rake package
sudo su # and make me a sandwitch
cd pkg gem install passenger-3.0.11.gem

start the nginx wizzard
/var/lib/gems/1.8/gems/passenger-3.0.11/bin/passenger-install-nginx-module
choose (1),(1)
enter enter enter
and all is installed

Read what is needed to add to nginx config if you do an upgrade

mainly the new passenger path

Please edit your Nginx configuration file (probably /opt/nginx/conf/nginx.conf),
and set the passenger_root and passenger_ruby configuration options in the
'http' block, like this:

  http {
      ...
      passenger_root /var/lib/gems/1.8/gems/passenger-3.0.11;
      passenger_ruby /usr/bin/ruby1.8;
      ...
  }

After you (re)start Nginx, you are ready to deploy any number of Ruby on Rails
applications on Nginx.

Press ENTER to continue.

The END

encoding decoding strings in python3.x


I like to think of  encoding of strings in python3 to the analogy of encrypting your plain text into a random stream of bytes

string (plain text) -> encode (encrypt) -> bytes (stream)
bytes (stream) -> decode (decrypt) -> string (plain text)

and the codec you choose is your key (utf-8 ...)


Sunday, January 29, 2012

Typing so many times the password in sudo is good or bad ?

Well if you watch National treasure  you will see how easy is to spot the common keys that you press with a special fluorescent/UV light , also the fingerprints on a keyboard are more visible on thouse keys (that would be the keys for sudo for example , or the login window) also some social engineering helps (knowing the person)


- I'm here.
- Give me the letters for her password.
What do you got for me?
Hit me with it.
A-E-F-G...L-O-R-V-Y.
Anagrams being listed.OK.
Top results: "A glove fry."...
...
- It's "Valley Forge"."Valley For..."
I don't have that on my computer.It's "Valley Forge" -she pressed the E and L twice.
Valley Forge was a turning pointin the American Revolution.C
an I marry your brain?
We're in.


That is why is better to use the ssh-agent , password-less sudo
and spread your password keys over your keyboard , and one more hint
it shouldn't be any reference to anything known about you in public/private life (eg if you love history:historical references with years dates , places)


Thursday, January 26, 2012

Welcome to the U-nderland

All you want is here , minus start menu and the close menus and minus the menus ,
Oh i told you that you shouldn't use menus , It's a paradigm shift , everything is search and google



Via doctormo who will be removed from the ubuntu holly planet
But dude where is my menu and close button
In the hud , in the hud  a small voice creeps into the ethereal space

 

Ubuntu Romania and Libre Software Romania (software liber) are against ACTA

Between revolutions we have to fight ACTA too , I will copy paste the message from Stas




Apparently, while most of the Romanians were busy with „Băsescu” crisis and snow, ourgovernment decided to sign ACTA.
To be honest, I’m not sure who’s job was to inform European population about this upcoming decision, but they did it in the worst possible way. Anyway, if you feel the need of blaming your regional/representative politician, you can get his address from here:agenda.grep.ro.
For those who just woke up in this world, and have no clue what’s this all about, take a look at this video.

About the picture above is from doctormo

Configuring pydev for django

I love some of the pydev features and here is my usual django/python setup

Install eclipse classic

Configure updates and add pydev

Configure updates and add eclipse themes

Install ipython
sudo easy_install ipython

Create or import pydev/django project

Configure java script editor (WTP webtools) in updates (in my case for indigo , choose from the repository manager in updates)



Learn and configure howto do remote debugging for django

The eclipse git plugin it crashed on me , aka it failed when i tried to do a push
It's slower than the c based implementation (eclpise plugin for git is written in pure java )
Did i told you that doesn't work , ok So you need to use command line for git , it's faster and better

Sunday, January 22, 2012

Why Zope fails and Django is better


I quote a thread from reddit and if you still use zope/plone you fail , there is nothing pythonic in the zope
I did a beginner mistake once to think that zope is somehow python and i could handle all the complexity and zope core ugliness but now I know the complexity monsters can't be tamed (include there XML , JAVA2EE, zope ... )

As a Python programmer, hardly anything you knew was useful when trying to do stuff in Zope. It was its own universe, with its own physical laws. You could do some simple things via the web interfaces, but as soon as you want to do stuff in Zope's odd variant of Python, you had to start from scratch.
And as a result, we lost a whole generation of Python web programmers.
In that respect, Django is more of an anti-Zope -- it's plain old Python pretty much all the time, you don't have to unlearn or relearn anything, and it has done more to get new programmers to pick up Python than any single Python library or application ever released before it. Heck, the Django mailing lists are almost as crowded as the Python mailing lists these days.

Illegal parameter: -WG while switching project from free pascal 2.4 to 2.6

While switching compiler from 2.4 to 2.6 under debian sid i had this error whilile
compiling an project created under ubuntu with lazarus 0.9.30.x and fpc 2.4

Illegal parameter: -WG




Solution is to remove : Target OS specific options (Win32 gui application -WG) from Project Compiler Options




Wednesday, January 11, 2012

Debugging tips for #perl tfmail.pl on a shared host with no logs , and windows on it ...

Well the story is that the tfmail.pl shows only this
Application Error An error has occurred in the program so no debug errors or anything else
I had to add debug mode for the script and saw this tip how to do it :

With Perl there is something you can try that will attempt to redirect error messages to the browser so you can attempt to diagnose the problem. Open the script in your text editor, and under the path to Perl on the first line, place this:
use CGI::Carp qw(fatalsToBrowser);
Only then I saw that LOGFILE_ROOT was set to '.' and that made the script die I have fixed the line
use constant LOGFILE_ROOT   => '';
and reuploaded and all was ok after that