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
Sunday, September 30, 2012
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 .
Thank you,
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
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 :)
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
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
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.
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.
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/
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
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
Labels:
i386,
linux 0.0.1,
QEMU,
ubuntu hardy heron
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
- Open up a terminal.
- Become root by typing su and enter your root password when prompted.
- Download some packages we'll need for the install. Type apt-get install build-essential debhelper fakeroot dpkg-dev firebird2.5-dev
- Change your current directory to your source one. cd /usr/src.
- Download the PHP 5 source code by typing apt-get source php5.
- We also need the PHP 5 dependencies. To download these, enter apt-get build-dep php5.
- Go into the downloaded PHP directory. cd php5-XXXX. just press
after you've typed php5- to complete the folder name. - 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 )
- 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.
- Now we've done setting up we now need to compile it. Type dpkg-buildpackage -rfakeroot -d
- When it's done, you should have a load of .deb files in the parent directory. Find the one starting with php5-gd.
- 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
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
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
$ 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.phpif 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:
http://virtually-a-machine.blogspot.ro/2010/09/live-migrating-ubuntu-to-debian-howto.html
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');
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
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
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
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
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
Old driver and soon to be deprecated , the recommended way is to use fdb
_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
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
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
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 pathhere 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
- 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
I use these bash aliases added in ~/.bashrc
Wednesday, March 28, 2012
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] DeprecationWarningso 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
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
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
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
# 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)
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
start the nginx wizzard
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
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-modulechoose (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)
- 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
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
About the picture above is from doctormo
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
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
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 :
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
Tuesday, January 10, 2012
Fibonacci procedure for #firebird
I had to do (recursive function example) Fibonacci stored procedure for Relational Databases exam
so here it is
To run it and test the numbers type in flamerobin
so here it is
To run it and test the numbers type in flamerobin
SELECT N_FIBONACCI
FROM FIBONACCI ('6')
=8
Sunday, January 08, 2012
Bloody Happy New Year
The last year , what i can say
One of my Childhood friends is Dead : Teodor Marian
I still don't know if he wanted to be a Priest like his father or if it was better for him to be a teacher
Before he Died (one week) i had this dream of playing around his House and i couldn't understand what is all about (I felt like someone from my family will Die).
I still can't find his Childhood face in my memory , Maybe is my Trauma that forbids access to it , I only rember his happy laugh and happy pieces of that period
The father of one of my coworkers is Dead
The New Year :
The Father of one of my coworkers is Dead
The Siamese Fish is Dead
The Sanitary Fish is Dead
All in All no matter how many walls you rise against the world there is something to shake the entire fundation
But now i feel better , life goes on and I know that there is something better than to dive into melancholy
I go back to ther roots , I love programming in Python , Pascal or any language
I still have one happy family at reea.net , i still have my Love and my future wife
I still have my Family near me even if they are so far away
Ohh Yes and still have the Exams this Month :)
There is always something (level of stress or excitement) that keeps you alive and kicking
One of my Childhood friends is Dead : Teodor Marian
I still don't know if he wanted to be a Priest like his father or if it was better for him to be a teacher
Before he Died (one week) i had this dream of playing around his House and i couldn't understand what is all about (I felt like someone from my family will Die).
I still can't find his Childhood face in my memory , Maybe is my Trauma that forbids access to it , I only rember his happy laugh and happy pieces of that period
The father of one of my coworkers is Dead
The New Year :
The Father of one of my coworkers is Dead
The Siamese Fish is Dead
The Sanitary Fish is Dead
All in All no matter how many walls you rise against the world there is something to shake the entire fundation
But now i feel better , life goes on and I know that there is something better than to dive into melancholy
I go back to ther roots , I love programming in Python , Pascal or any language
I still have one happy family at reea.net , i still have my Love and my future wife
I still have my Family near me even if they are so far away
Ohh Yes and still have the Exams this Month :)
There is always something (level of stress or excitement) that keeps you alive and kicking
Wednesday, December 28, 2011
My FSocial Network
Here is how my FNetwork looks like bellow
The only observation I'm mostly strongly connected with coworkers , that means that i use the network for coworker notifications or maybe i'm workaholic :)
I wish the visualisation was made with webgl
Tuesday, December 27, 2011
One way to run firebird pdo tests
Just to not forget how to run them i write here
TEST_PHP_EXECUTABLE=auto php -n ./run-tests.php ext/pdo_firebirdof course you can add username/password , db path
PDO_FIREBIRD_TEST_DSN='firebird:dbname=/var/lib/firebird/2.5/data/employee.fdb' PDO_FIREBIRD_TEST_USER='SYSDBA' PDO_FIREBIRD_TEST_PASS='masterkey' TEST_PHP_EXECUTABLE=auto php -n ./run-tests.php ext/pdo_firebirdSaw it via comment section from pdo firebird driver documentation
Saturday, December 10, 2011
php doc team docbook editor is pretty cool
We want something like this for firebird doc team :)
Here is one shot with the documentation writing online, no need for other xml editors
Thursday, December 08, 2011
wodim saved my day and wrote the xubuntu 64 bit iso at last
I had problems with burning dvds both with xfburn and with brasero too
One of the errors was
SCSI error on write(0,16): [3 73 03] Power calibration area error
Another problem was that burn completed the writing in xfburn but when reading and checking the md5 for the dvd
dd bs=1M if=/dev/sr0 of=/tmp/iso
[ 349.397899] sr 0:0:1:0: [sr0] Add. Sense: No seek complete
[ 349.397906] sr 0:0:1:0: [sr0] CDB: Read(10): 28 00 00 05 49 df 00 00 01 00
[ 349.397925] end_request: I/O error, dev sr0, sector 1386364
[ 349.397933] Buffer I/O error on device sr0, logical block 346591
[ 373.127873] sr 0:0:1:0: [sr0] Unhandled sense code
[ 373.127880] sr 0:0:1:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 373.127887] sr 0:0:1:0: [sr0] Sense Key : Medium Error [current]
[ 373.127896] Info fld=0x5299c
[ 373.127899] sr 0:0:1:0: [sr0] Add. Sense: No seek complete
[ 373.127907] sr 0:0:1:0: [sr0] CDB: Read(10): 28 00 00 05 29 9c 00 00 20 00
[ 373.127926] end_request: I/O error, dev sr0, sector 1353328
[ 373.127933] Buffer I/O error on device sr0, logical block 338332
[ 373.127939] Buffer I/O error on device sr0, logical block 338333
[ 373.127954] Buffer I/O error on device sr0, logical block 338334
[ 373.127957] Buffer I/O error on device sr0, logical block 338335
[ 373.127961] Buffer I/O error on device sr0, logical block 338336
[ 373.127964] Buffer I/O error on device sr0, logical block 338337
[ 373.127967] Buffer I/O error on device sr0, logical block 338338
[ 373.127970] Buffer I/O error on device sr0, logical block 338339
[ 373.127974] Buffer I/O error on device sr0, logical block 338340
[ 373.127977] Buffer I/O error on device sr0, logical block 338341
[ 379.137046] sr 0:0:1:0: [sr0] Unhandled sense code
[ 379.137053] sr 0:0:1:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 379.137060] sr 0:0:1:0: [sr0] Sense Key : Medium Error [current]
[ 379.137069] Info fld=0x5299c
and it damaged every dvd i have throwed to it
Solution was to use the command line tools (saw it on a forum or in a bug tracker )
wodim -v dev=/dev/sr0 speed=4 xubuntu-11.10-desktop-amd64.iso
wodim: No write mode specified.
wodim: Assuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
TOC Type: 1 = CD-ROM
scsidev: '/dev/sr0'
devname: '/dev/sr0'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Wodim version: 1.1.11
SCSI buffer size: 64512
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'Optiarc '
Identification : 'DVD RW AD-7200A '
Revision : '1.06'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: 0x001B (DVD+R)
Profile: 0x002B (DVD+R/DL)
Profile: 0x001B (DVD+R) (current)
Profile: 0x001A (DVD+RW)
Profile: 0x0016 (DVD-R/DL layer jump recording)
Profile: 0x0015 (DVD-R/DL sequential recording)
Profile: 0x0014 (DVD-RW sequential recording)
Profile: 0x0013 (DVD-RW restricted overwrite)
Profile: 0x0012 (DVD-RAM)
Profile: 0x0011 (DVD-R sequential recording)
Profile: 0x0010 (DVD-ROM)
Profile: 0x000A (CD-RW)
Profile: 0x0009 (CD-R)
Profile: 0x0008 (CD-ROM)
Profile: 0x0002 (Removable disk)
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags : SWABAUDIO BURNFREE
Supported modes: PACKET SAO
Drive buf size : 1310720 = 1280 KB
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
FIFO size : 12582912 = 12288 KB
Track 01: data 693 MB
Total size: 796 MB (78:52.88) = 354966 sectors
Lout start: 796 MB (78:54/66) = 354966 sectors
Current Secsize: 2048
HINT: use dvd+rw-mediainfo from dvd+rw-tools for information extraction.
Blocks total: 2295104 Blocks current: 2295104 Blocks remaining: 1940138
Speed set to 5540 KB/s
Starting to write CD/DVD at speed 4.0 in real unknown mode for single session.
Last chance to quit, starting real write in 0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Performing OPC...
Starting new track at sector: 0
Track 01: 1 of 693 MB written (fifo 97%) [buf 62%] 0.5x.
One of the errors was
SCSI error on write(0,16): [3 73 03] Power calibration area error
Another problem was that burn completed the writing in xfburn but when reading and checking the md5 for the dvd
dd bs=1M if=/dev/sr0 of=/tmp/iso
[ 349.397899] sr 0:0:1:0: [sr0] Add. Sense: No seek complete
[ 349.397906] sr 0:0:1:0: [sr0] CDB: Read(10): 28 00 00 05 49 df 00 00 01 00
[ 349.397925] end_request: I/O error, dev sr0, sector 1386364
[ 349.397933] Buffer I/O error on device sr0, logical block 346591
[ 373.127873] sr 0:0:1:0: [sr0] Unhandled sense code
[ 373.127880] sr 0:0:1:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 373.127887] sr 0:0:1:0: [sr0] Sense Key : Medium Error [current]
[ 373.127896] Info fld=0x5299c
[ 373.127899] sr 0:0:1:0: [sr0] Add. Sense: No seek complete
[ 373.127907] sr 0:0:1:0: [sr0] CDB: Read(10): 28 00 00 05 29 9c 00 00 20 00
[ 373.127926] end_request: I/O error, dev sr0, sector 1353328
[ 373.127933] Buffer I/O error on device sr0, logical block 338332
[ 373.127939] Buffer I/O error on device sr0, logical block 338333
[ 373.127954] Buffer I/O error on device sr0, logical block 338334
[ 373.127957] Buffer I/O error on device sr0, logical block 338335
[ 373.127961] Buffer I/O error on device sr0, logical block 338336
[ 373.127964] Buffer I/O error on device sr0, logical block 338337
[ 373.127967] Buffer I/O error on device sr0, logical block 338338
[ 373.127970] Buffer I/O error on device sr0, logical block 338339
[ 373.127974] Buffer I/O error on device sr0, logical block 338340
[ 373.127977] Buffer I/O error on device sr0, logical block 338341
[ 379.137046] sr 0:0:1:0: [sr0] Unhandled sense code
[ 379.137053] sr 0:0:1:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 379.137060] sr 0:0:1:0: [sr0] Sense Key : Medium Error [current]
[ 379.137069] Info fld=0x5299c
and it damaged every dvd i have throwed to it
Solution was to use the command line tools (saw it on a forum or in a bug tracker )
wodim -v dev=/dev/sr0 speed=4 xubuntu-11.10-desktop-amd64.iso
wodim: No write mode specified.
wodim: Assuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
TOC Type: 1 = CD-ROM
scsidev: '/dev/sr0'
devname: '/dev/sr0'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Wodim version: 1.1.11
SCSI buffer size: 64512
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'Optiarc '
Identification : 'DVD RW AD-7200A '
Revision : '1.06'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: 0x001B (DVD+R)
Profile: 0x002B (DVD+R/DL)
Profile: 0x001B (DVD+R) (current)
Profile: 0x001A (DVD+RW)
Profile: 0x0016 (DVD-R/DL layer jump recording)
Profile: 0x0015 (DVD-R/DL sequential recording)
Profile: 0x0014 (DVD-RW sequential recording)
Profile: 0x0013 (DVD-RW restricted overwrite)
Profile: 0x0012 (DVD-RAM)
Profile: 0x0011 (DVD-R sequential recording)
Profile: 0x0010 (DVD-ROM)
Profile: 0x000A (CD-RW)
Profile: 0x0009 (CD-R)
Profile: 0x0008 (CD-ROM)
Profile: 0x0002 (Removable disk)
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags : SWABAUDIO BURNFREE
Supported modes: PACKET SAO
Drive buf size : 1310720 = 1280 KB
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
FIFO size : 12582912 = 12288 KB
Track 01: data 693 MB
Total size: 796 MB (78:52.88) = 354966 sectors
Lout start: 796 MB (78:54/66) = 354966 sectors
Current Secsize: 2048
HINT: use dvd+rw-mediainfo from dvd+rw-tools for information extraction.
Blocks total: 2295104 Blocks current: 2295104 Blocks remaining: 1940138
Speed set to 5540 KB/s
Starting to write CD/DVD at speed 4.0 in real unknown mode for single session.
Last chance to quit, starting real write in 0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Performing OPC...
Starting new track at sector: 0
Track 01: 1 of 693 MB written (fifo 97%) [buf 62%] 0.5x.
after that everything went fine
dd bs=1M if=/dev/sr0 of=/tmp/iso
693+1 records in
693+1 records out
726990848 bytes (727 MB) copied, 139.896 s, 5.2 MB/s
dd bs=1M if=/dev/sr0 of=/tmp/iso
693+1 records in
693+1 records out
726990848 bytes (727 MB) copied, 139.896 s, 5.2 MB/s
Tuesday, November 29, 2011
Friday, November 25, 2011
Replacing gnome3 with xfce/lxde on #fedora core 16
To replace and remove the ugly gnome 3 interface from fedora core 16 (it doesn't work if you don't have hw 3d acceleration if you are on a remote vnc session ) and to enable something more light and classy
you need to do the following easy steps
(it's better to do it in a console)
yum groupremove 'GNOME Desktop Environment'
yum groupinstall XFCE
yum groupinstall LXDE
create the file with a editor
/etc/sysconfig/desktop
DISPLAYMANAGER=/usr/sbin/lxdm
PREFERRED=/usr/bin/startlxde
and reboot
to enable vnc session for remote users
/bin/su username -c "/usr/bin/vncserver :1 -geometry 1440x900"
also it can be added in the rc.local so they will be enabled at server startup
/bin/su username2 -c "/usr/bin/vncserver :2 -geometry 1440x900"
/bin/su username3 -c "/usr/bin/vncserver :3 -geometry 1440x900"
....
you need to do the following easy steps
(it's better to do it in a console)
yum groupremove 'GNOME Desktop Environment'
yum groupinstall XFCE
yum groupinstall LXDE
create the file with a editor
/etc/sysconfig/desktop
DISPLAYMANAGER=/usr/sbin/lxdm
PREFERRED=/usr/bin/startlxde
and reboot
to enable vnc session for remote users
/bin/su username -c "/usr/bin/vncserver :1 -geometry 1440x900"
also it can be added in the rc.local so they will be enabled at server startup
/bin/su username2 -c "/usr/bin/vncserver :2 -geometry 1440x900"
/bin/su username3 -c "/usr/bin/vncserver :3 -geometry 1440x900"
....
Wednesday, November 23, 2011
Volumeicon +xfce-mixer part two : better volume applet in #lxde for !debian or #Lubuntu
Dedicated to Jancsi who just switched from unity to Lubuntu
As you might now from part one i use volumeicon for controlling my speakers when i listen to music
There is no easy graphical mixer in lubuntu but
There is the help of xfce4-mixer to the rescue
open console and type to in
it places an icon in status bar and when you right click you can choose mixer and it will show you the xfce4-mixer in all it's glory
I have two soundcars so i have added in the config
As you might now from part one i use volumeicon for controlling my speakers when i listen to music
There is no easy graphical mixer in lubuntu but
There is the help of xfce4-mixer to the rescue
open console and type to in
sudo apt-get install xfce4-mixernext install and compile volumeicon with the patch to use xfce4-mixer by default
it places an icon in status bar and when you right click you can choose mixer and it will show you the xfce4-mixer in all it's glory
git clone https://github.com/mariuz/volumeicon.git cd volumeicon
sudo apt-get install libasound2-dev ./configure --prefix=/usr sudo make install
I have two soundcars so i have added in the config
cat /proc/asound/cards
0 [HDMI ]: HDA-Intel - HDA ATI HDMI
HDA ATI HDMI at 0xfeaec000 irq 44
1 [default ]: USB-Audio - Microsoft LifeChat LX-3000
Microsoft LifeChat LX-3000 at usb-0000:00:1d.2-1, full speed
vi ~/.config/volumeicon/volumeicon
[Alsa]
card=hw:1
Start volumeicon or add it to the startup session volumeicon &if you are on pure LXDE/Debian
editor ~/.config/lxsession/LXDE/autostart #add to the file @volumeiconIf you are on Lubuntu
editor ~/.config/lxsession/Lubuntu/autostart #add to the file @volumeiconby default when you click on volume icon it mutes the sound card so in preferences i put Left Mouse Button Action to open the Slider And the Channel will be PCM
LightDM on Xubuntu 11.10 horror story
I have installed xubuntu 11.10 on one machine that was already with kubuntu installed on it
after reboot there was nologin only some flashes
I have disabled graphical boot , deleted quiet and all the pretty options in the grub menu (nomodeset added too)
no luck
removed kdm still no luck
I have launched lightdm manually with debug flag
lightdm -d and saw that it needs unity-greeter and there was no such thing as unity-greeter installed
so i have installed it and changed to the classic gtk greeter
In /etc/lightdm/lightdm.conf i have changed
greeter-session=lightdm-gtk-greeter
Reboot and still in the logs i saw "lightdm main process TERM signal"
and No greeter .
What is weird that lxdm started if launched from command line also
the start-xfce4 worked ok
what to do ?
i have added in rc.local
start lightdm and after reboot
the login was ok again
after reboot there was nologin only some flashes
I have disabled graphical boot , deleted quiet and all the pretty options in the grub menu (nomodeset added too)
no luck
removed kdm still no luck
I have launched lightdm manually with debug flag
lightdm -d and saw that it needs unity-greeter and there was no such thing as unity-greeter installed
so i have installed it and changed to the classic gtk greeter
In /etc/lightdm/lightdm.conf i have changed
greeter-session=lightdm-gtk-greeter
Reboot and still in the logs i saw "lightdm main process TERM signal"
and No greeter .
What is weird that lxdm started if launched from command line also
the start-xfce4 worked ok
what to do ?
i have added in rc.local
start lightdm and after reboot
the login was ok again
Tuesday, November 22, 2011
Installing qxl drivers on Windows7 guest (and others virtio drivers for ballooning memory, virtioserial, network and viostor)
Download qxl driver Windows qxl driver qxl-0.10-20112808.zip
extract it then install it
cd x86
pnputil -i -a qxl.inf
from the downoad page also you need to install spice vd-agent Windows guest agent - vdagent-win32_20111124.zip
Last thing you need to do is install the virtual desktop agent for your windows 7 guest. To do this, copy the two executable files from the vdagent zip file
Now go to the directory where these executables are located and type “vdservice install”. This will install and start the guest agent service as shown below.
You might need virtio drivers
The drivers include virtio drivers for ballooning memory, virtioserial, network and viostor ( block drivers ). These drivers are signed but not WHQL and there are no gui installers for them.
This is the installation method with virtio drivers :
Download the the host the iso.
Mount the iso in the windows guest machine from the the virt-manager details interface
and for each inf install it and then configure the machine to use the virtio
d:\
cd Windows7
cd x86
pnputil -i -a *.inf
extract it then install it
cd x86
pnputil -i -a qxl.inf
from the downoad page also you need to install spice vd-agent Windows guest agent - vdagent-win32_20111124.zip
Last thing you need to do is install the virtual desktop agent for your windows 7 guest. To do this, copy the two executable files from the vdagent zip file
Now go to the directory where these executables are located and type “vdservice install”. This will install and start the guest agent service as shown below.
You might need virtio drivers
The drivers include virtio drivers for ballooning memory, virtioserial, network and viostor ( block drivers ). These drivers are signed but not WHQL and there are no gui installers for them.
This is the installation method with virtio drivers :
Download the the host the iso.
Mount the iso in the windows guest machine from the the virt-manager details interface
and for each inf install it and then configure the machine to use the virtio
d:\
cd Windows7
cd x86
pnputil -i -a *.inf
Monday, November 21, 2011
Ie9 on kvm-linux
The steps/scripts for using ie9 test machine are quite easy to follow if you are using
virtualbox
but what about kvm-linux ?
I followed the guide to make vhd to kvm raw This guides works but it creates a raw partition of 127G in size so is not so good :
qemu-img convert -f vpc -O raw Windows\ 7.vhd Windows7ie9.img
so i used this command line instead:
qemu-img convert -f vpc -O qcow2 Windows\ 7.vhd Windows7ie9.qcow
and image is now ~ 13G
Create new virtual machine importing the converted qcow2 image
Notice I had an issue with the tablet device so i have disabled it for vnc
You can add montly script in scheduler to rearm it on the windows guest
rearm.bat
slmgr –rearm
shutdown -r -t 0
Next i had some issues with vnc (mouse positioned weird and at the distance with the vnc cursor when connecting from remote)
and I have enabled the spice server instead of the vnc one in the virt-manager configuration for this host and then installed spice client on my machine
sudo apt-get install spice-client
run it with
spice-client
type host port and password if you have one set
To Exit the spice client Shift - F12
but what about kvm-linux ?
I followed the guide to make vhd to kvm raw This guides works but it creates a raw partition of 127G in size so is not so good :
so i used this command line instead:
qemu-img convert -f vpc -O qcow2 Windows\ 7.vhd Windows7ie9.qcow
and image is now ~ 13G
Create new virtual machine importing the converted qcow2 image
Notice I had an issue with the tablet device so i have disabled it for vnc
You can add montly script in scheduler to rearm it on the windows guest
rearm.bat
slmgr –rearm
shutdown -r -t 0
Next i had some issues with vnc (mouse positioned weird and at the distance with the vnc cursor when connecting from remote)
and I have enabled the spice server instead of the vnc one in the virt-manager configuration for this host and then installed spice client on my machine
sudo apt-get install spice-client
run it with
spice-client
type host port and password if you have one set
To Exit the spice client Shift - F12
Monday, November 14, 2011
theÖutlet new free album by absurdcus
Absurducus launched his album on 11.11.11 and at 11.11 AM/PM you can add remove a few nanoseconds just for fun
Album is under Attribution-NonCommercial-NoDerivs 3.0 Unported (CC BY-NC-ND 3.0) and can be ripped and then after you listen you can donate to make him millionaire
Album is under Attribution-NonCommercial-NoDerivs 3.0 Unported (CC BY-NC-ND 3.0) and can be ripped and then after you listen you can donate to make him millionaire
Sunday, November 13, 2011
Correcting #ubuntu Unity mistake - move it at the bottom
I use Lubuntu or Xubuntu and i have read that the problem with the unity on the left side can be easily fixed
I think no one would complain if the bar would be at the bottom with a proper classic start menu (win7 style) isn't it ? and yes with the close buttons on the right please
ps : I have enough pixels or two monitors to put unity wherever i like and want , that is the cost of freedom
I think no one would complain if the bar would be at the bottom with a proper classic start menu (win7 style) isn't it ? and yes with the close buttons on the right please
ps : I have enough pixels or two monitors to put unity wherever i like and want , that is the cost of freedom
Saturday, November 12, 2011
My next phone will be with Debian / Ubuntu
This ubuntu phone art concept made me think that i really want a Linux phone based on Debian/Ubuntu
I don't want a Nokia zombie all i want a true open source phone (true in the heart and true in the ubuntu spirit)
I don't want a Nokia zombie all i want a true open source phone (true in the heart and true in the ubuntu spirit)
Friday, November 11, 2011
#Ubuntu After the uTorrent page was virused i recommend QBittorrent to anyone
I'm pissed utorrent doesn't make a client for Linux until the endof the year (only next) but in a sense
we Linux users don't really care , there are many torrent clients to choose from
One that i love is qbittorrent.
It works great on all platforms , it is written in QT framework
and it looks and feels just like uTorrent minus the crappy bars and viruses
Did i mentioned that is small and better in the sense that is simpler to use than kTorrent (starts in < 1s instead of minutes)
And it does have a cool logo too
In ubuntu you can install this way
sudo apt-get install qbittorrent
or on windows/macosx from this page
In ubuntu you can install this way
sudo apt-get install qbittorrent
or on windows/macosx from this page
Building kinterbasdb docs
sudo apt-get install python-sphinx svn co https://firebird.svn.sourceforge.net/svnroot/firebird/kinterbasdb kinterbasdb kinterbasdb/trunk/sphinx make html mkdir -p .build/html .build/doctrees sphinx-build -b html -d .build/doctrees . ../docs Running Sphinx v1.0.7 loading pickled environment... not yet created building [html]: targets for 11 source files that are out of date updating environment: 11 added, 0 changed, 0 removed reading sources... [100%] tutorial /home/mariuz/work/kinterbasdb/trunk/sphinx/beyond-python-db-api.txt:75: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string. /home/mariuz/work/kinterbasdb/trunk/sphinx/beyond-python-db-api.txt:: WARNING: using old C markup; please migrate to new-style markup (e.g. c:function instead of cfunction), see http://sphinx.pocoo.org/domains.html /home/mariuz/work/kinterbasdb/trunk/sphinx/changelog.txt:950: (WARNING/2) Block quote ends without a blank line; unexpected unindent. /home/mariuz/work/kinterbasdb/trunk/sphinx/changelog.txt:1158: (WARNING/2) Definition list ends without a blank line; unexpected unindent. /home/mariuz/work/kinterbasdb/trunk/sphinx/concurrency.txt:167: (WARNING/2) Block quote ends without a blank line; unexpected unindent. /home/mariuz/work/kinterbasdb/trunk/sphinx/python-db-api-compliance.txt:32: WARNING: duplicate object description of kinterbasdb.Cursor, other instance in /home/mariuz/work/kinterbasdb/trunk/sphinx/beyond-python-db-api.txt, use :noindex: for one of them /home/mariuz/work/kinterbasdb/trunk/sphinx/python-db-api-compliance.txt:107: WARNING: duplicate object description of kinterbasdb.Connection, other instance in /home/mariuz/work/kinterbasdb/trunk/sphinx/beyond-python-db-api.txt, use :noindex: for one of them looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] tutorial writing additional files... genindex py-modindex search copying static files... done dumping search index... done dumping object inventory... done build succeeded, 7 warnings. Build finished. The HTML pages are in .build/html.
Saturday, November 05, 2011
fixing !Debian sid dpkg: warning: 'ldconfig' not found in PATH or not executable.
If you have this bug with sid
when you do sudo apt-get dist-upgrade
dpkg: warning: 'ldconfig' not found in PATH or not executable.The simple solution is to modify in /etc/sudoers
Defaults env_reset Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
constantly usable #debian testing installer
If you search for usable testing iso you can find a debian Official CD/DVD images of the testing distribution (regenerated weekly)
you only need the first cd from the list , burn CD1 iso it and start (boot from it)
Sunday, October 16, 2011
making sound in tux guitar #ubuntu and #debian
I had no sound
on my tuxguitar when playing gp3 files
so i had to install timidity and java sound plugin
(they are not installed by default )
sudo apt-get install timidity tuxguitar-jsa
and then select in Tools ->Settings -> Sound
Midi Port -> Timidity
Now i can go back to [Eric Clapton] Cocaine
Monday, October 03, 2011
Php Image Slow SMP Magick on #Ubuntu / #Debian
There is a known bug with Image Magick : it can be very slow when used with openmp enabled (by default in debian/ubuntu) on multicore systems (almost on all servers these days)
It is eating a lot of cpu (50-100% for each core) instead of idling at 1-2% (for simple image manipulations)
It was strange for me that one single core server was faster than a quad core in the same specs with the rest of the config (os ubuntu 10.04 lts, kernel latest, ioscheduler : deadline)
Eliminating the problems on what could slow down the server (php version , image magick version , kernel version ) the only thing left was cpu
Solution is very simple configure imagemagick without openmp
it should look like
apt-get buil-dep imagemagick apt-get source imagemagick cd imagemagick-6.5.7.8/ sudo vi debian/rulesadd ~ line 39 --disable-openmp (dont' forget to add \ to the privious line)
it should look like
--x-libraries=/usr/lib/X11 \
--disable-openmp
Rebuild the package and reinstall
dpkg-buildpackage -b sudo apt-get remove --purge libmagickcore2 cd .. dpkg -i libmagickcore2* libmagickwand2* apt-get install php5-imagick /etc/init.d/apache2 restart
Sunday, October 02, 2011
Where the rock stars go when they go down ? they go to country hell
My biggest wtf moments were when i saw that Robert Plant is singing and dancing country music
I wondered for months and years how that could that happen ? how he can go so low
After so many great performances in rock concerts .
While listening to many Blues Bands i observed that many songs were ripped by Led Zepelin and others
so in the end Led Zeppelin is one of the best Cover Bands of them all
This why the main lead singer can go so low , he can play anything even country music (no sacrifice or spells were involved in the process)
Subscribe to:
Comments (Atom)














