howto

A how-to is an informal, often short, description of how to accomplish a specific task. A how-to is usually meant to help non-experts, may leave out details that are only important to experts, and may also be greatly simplified from an overall discussion of the topic. read more at WikiPedia

  • atlassian.bamboo.logo My Bamboo continuous integration server is now fully functional and available at&160; http://bamboo.waltercedric.com/

    &160;

    &160;

    &160;

    Remember Atlassian is providing free license for Open Source Projects:

    Atlassian supports and believes in the Open Source movement -Bamboo utilizes a number of good Open Source components, and Atlassian developers are committers on a large number of Open Source projects.

    To give back to the open source community (and hopefully improve the quality of those projects!),Bamboo is free for any Open Source project to use.

    There are a few requirements for an Open Source license, the main ones being:

    • Established code base
    • Publicly available project website
    • Using an approved open source license
    • YourBamboo instance will be publicly accessible

    My objective is to make Joomla! and all my projects also running in Bamboo (not only in TeamCity as the limit of 20 builds will be rapidly reached)

    Visit it by clicking on the picture

    Very quick Bamboo install how to

    Install a fresh Tomcat 6 runtime,

    Move the war into the ROOT web context of tomcat

    Choose free port for HTTP, AJP, and Tomcat server port&160; in conf/server.xml

    <Server port="8050" shutdown="SHUTDOWN">
    
    <Connector port="8051" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443"
               enableLookup="false"         
               useBodyEncodingForURI="true" 
    
    <Connector port="8030" protocol="AJP/1.3" redirectPort="8443" />

    Copy mysqldriver.jar into /lib

    Configure the data source into server.xml

    <Host name="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true"
                xmlValidation="false" xmlNamespaceAware="false">
            <Resource name="jdbc/BambooDS" auth="Container" type="javax.sql.DataSource"
                username="user"
                password="pwd"
                driverClassName="com.mysql.jdbc.Driver"            
                url="jdbc:mysql://localhost/schema?autoReconnect=true"            
                maxActive="20"
                validationQuery="select 1" />

    Edit /etc/apache/worker.properties

    worker.list=ajp13, teamcity, jira, bamboo
    worker.bamboo.port=8030
    worker.bamboo.host=localhost
    worker.bamboo.type=ajp13

    &160;

    Create a vhost.conf in the subdomains

    # vi /srv/www/vhosts/waltercedric.com/subdomains/bamboo/conf/vhost.conf

    ServerName bamboo.waltercedric.com
    
    ProxyPass /  ajp://bamboo.waltercedric.com:8030/
    <Proxy *>
       Order Allow,Deny
       Allow from all
    </Proxy>
    
    <Directory />
      Options FollowSymLinks
      AllowOverride None
    </Directory>

    To tell plesk to include an overridden vhost.conf, run

    # /usr/local/psa/admin/sbin/websrvmng

    Restart Apache2

    rcapache2 restart

  • Tomshardware has an interesting articles for all XBOX modder which prefer having an original Network attached Storage instead of a game machine.

    With the arrival of the Xbox360, there will soon be a buyer's market for its older sibling. Kevin Herring shows how to give an Xbox a new lease on life as a full-featured NAS.


    {mosgoogle}

  • spektrumDX5e

    Spektrum introduces another enormous change for the RC industry—The most affordable full-range 2.4GHz radio ever available. The DX5e brings together the unbeatable control of genuine DSM2 technology with the simplest, easiest-to-use design available, letting anyone, from park fliers to students to instructors and more, take advantage of Spektrum technology for less

    Mode 2 is most often used in the United States, while Mode 1 is most often used in Europe, there are two other modes that are used overseas and here is a listing of the 4 modes and their actions.

     

      Left stick Right stick
    up/down left/right up/down left/right
    Mode 1 elevator rudder throttle aileron
    Mode 2 throttle rudder elevator aileron
    Mode 3 elevator aileron throttle rudder
    Mode 4 throttle aileron elevator rudder
  •   I am  currently in the process of  moving all my open source project (7!) in CVS Head to the latest Joomla API 1.1.X. I've tried to summarize in the following table some conversion rules

    In Joomla 1.0.Xhas to be converted in Joomla 1.1.XWhere
    mosMenuBar::startTable();
    JMenuBar::startTable();PHP code
    defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');defined( '_JEXEC' ) or die( 'Restricted access' );PHP code
    require_once( $mainframe->getPath( 'toolbar_html' ) );require_once( JApplicationHelper::getPath( 'toolbar_html' ) );PHP code
    <?xml version="1.0" encoding="iso-8859-1"?>
    <mosinstall type="component" version="1.0.0">
    ....
    <?xml version="1.0" encoding="iso-8859-1"?>
    <install type="component" version="1.0.0">
    ....
    Installer XML file
    More to come...

    Bad news
    • New code wont work in Joomla 1.0.X or latest
    • New code wont work in Mambo 4.X or latest

    Some links which may help also Help You:

    {mosgoogle}

  • joomla_cms

     10 minutes ago, I got a strange error message:

    DB function failed with error number 1016
    Can't open file: 'mos_session.MYI'. (errno: 145) SQL=SELECT session_id FROM mos_session WHERE session_id=MD5('e20eafcf277b7bc0dd125357b4a1b223')
    SQL =
    SELECT session_id FROM mos_session WHERE session_id=MD5('e20eafcf277b7bc0dd125357b4a1b223'

    I was not able to access the frontend or admin panel of my homepage. I tried to look in PHPMyAdmin the table mos_session but was getting the same error message. The only solution was to recreate the table with the following code:

    DROP TABLE IF EXISTS `mos_session`;
    CREATE TABLE `mos_session` (
    `username` varchar(50) default '',
    `time` varchar(14) default '',
    `session_id` varchar(200) NOT NULL default '0',
    `guest` tinyint(4) default '1',
    `userid` int(11) default '0',
    `usertype` varchar(50) default '',
    `gid` tinyint(3) unsigned NOT NULL default '0',
    PRIMARY KEY (`session_id`),
    KEY `whosonline` (`guest`,`usertype`)
    ) TYPE=MyISAM;

    Why my table has crashed is still unknow but I am looking further in logs files...
  • Create a new RSA key

    # openssl genrsa -des3 -out server.key 1024
    Give a very lengthy key, and save it somewhere in a PGP file or TrueCrypt volume

    Create a non encrypted version for Apache

    # openssl rsa -in server.key -out server.key.unsecure

    Prepare the mark inquiry

    # openssl req -new -key server.key -out server.csr
    Attention enter the host from where the certificate will be use, since browser are matching content of certificate with host url.

    Sign the certificate

    # openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

    Add the SSL certificate to Apache

    Attention
    path to server.key and server.crt may differ!

    (SuSE 9.3 keys store at /etc/apache2/ssl.key/)
    # cp server.key.unsecure /etc/httpd/ssl.key/server.key
    # cp server.crt /etc/httpd/ssl.crt/server.crt
    # chmod 400 /etc/httpd/ssl.key/server.key
    # chmod 400 /etc/httpd/ssl.crt/server.crt

    Restart Apache

    BrutalGraceful

    # /etc/init.d/apache restart

    # apache2ctl gracefu
     
  • I've installed SuSE 9.3 on a Notebook HP Nx7000 and a AMD desktop without any major difficulties except the fact that for some legal reasons, Novel has removed the ability of SuSe to play out the box any Divx, Xvid, mp3. In fact If You have a acess to internet, the online update tool may resolve some of these issues (You will have to download what Novel call "Multimedia pack" ). After using 2 years long SuSE 9.0, 9.1, 9.2 and now 9.3 I found pathetic that I still need to remove this crappy noatun, kaffeine and xine because they simply do not work as good as Mplayer or even better Videolan (VLC). Note that both Videolan, or VLC can not be install through YaST, and I think that it is really a big mistake.
    So let repair this by:

    • Installing APT-GET packaging system (a lot simpler than YaST as It deal with package conflicts!!!), First read this page, then If You are interested read on :-)
    • Decode encrypted DVD  under Suse 9.3
    • Install Videolan (VLC), the best multiplattform video player

     Before deciding to buy it, download it (FTP source are here), or starting Your favorite Bittorent client, You can

  • offVertColor-phil2.eps  Short description of how to accomplish some specific task in Debian Lenny.

    • How to install Sun java 1.6 on Debian Lenny
    • How to install Tomcat 6.x on Debian Lenny
    • How to install MySQL on Debian Lenny

     

     

     

     

     

     

    How to install Sun java 1.6 on Debian Lenny

    And not the OpenJDK, as sometimes some applications do not work without the SUN JDK

    Edit APT sources list

    # vi /etc/apt/sources.list

    The original Sun Java 2 is available in the ‘non-free’ section of the Debian repositories. To enable this section first add the non-free repository to the apt sources file - the /etc/apt/sources.list should look like, - important parts are in bold:

    deb http://ftp.ch.debian.org/debian/ lenny main non-free
    deb-src http://ftp.ch.debian.org/debian/  lenny main non-free
    deb http://security.debian.org  lenny/updates main

    Update the list of sources

    apt-get update

    Install java

    #  apt-get install sun-java6-bin

    Just follow and select all the time

    How to install Tomcat 6 on Debian Lenny

    Create new file

    # vi /etc/apt/sources.list.d/squeeze.list

    and put inside

    # Repository for Squeeze, to get Tomcat6
    deb http://ftp.ch.debian.org/debian/ squeeze main contrib non-free
    deb-src http://ftp.ch.debian.org/debian/ squeeze main contrib non-free

    Create new file

    # vi /etc/apt/preferences

    And put inside

    Package: *
    Pin: release o=Debian,a=stable
    Pin-Priority: 990
    Package: *
    Pin: release o=Debian,a=testing
    Pin-Priority: 500
    Package: tomcat6,tomcat6-admin,tomcat6-common,libtomcat6-java,libservlet2.5-java
    Pin: release o=Debian,a=testing
    Pin-Priority: 990

    Update sources

    # apt-get update

    Upgrade

    # apt-get upgrade

    To locate the correct package name, search for it

    # apt-cache search tomcat

    Found

    tomcat6

    Install

    # apt-get install -t testing tomcat6

    You may want also to install the tomcat manager

    # apt-get install -t testing tomcat6-admin

    Create new users/roles for tomcat manager

    # vi /etc/tomcat6/tomcat-users.xml

    NOTA: Webapp are located in

    /var/lib/tomcat6/webapp

    How to install MYSQL on Debian Lenny

    Luckily MYSQL 5.0 is available in the default source list of APT.

    # apt-cache search mysql
    # apt-get install mysql-server-5.0

    Open a mysql prompt

    Grant access to root from any host, this is insecure for production machine but in case of continuous build machine, development this is sometimes very useful.

    Let root connect not only from localhost by running

    # mysql –u root –p
    mysql> use mysql;
    mysql> update user set host = '%' where user = 'root' and host='127.0.0.1'
    mysql> flush privileges;

    Bad written code (DAO) will sometimes forces you to start MYSQL using insensitive casing table. In windows it will always work as the operating system do not make any difference between lower and upper case. In Linux, either you change your DAO’s or if you can’t, use this kind of trick:

    Case insensitive table in MYSQL

    # vi /etc/mysql/conf.d/lower_case_table_names.cnf

    Put inside file

    [mysqld]
    lower_case_table_names = 1

    Restart mysql

    # /etc/init.d/mysql restart

  • apache_maven

     cargo-banner-left
    A ready to use example on how you can deploy your web application to a Tomcat 6 container using Maven Cargo. Cargo is a thin wrapper that allows you to manipulate Java EE containers in a standard way. 

    Cargo provides the following Tools and APIs:

    • A Java API to start/stop/configure Java Containers and deploy modules into them.
    • A Java API to parse/create/merge Java EE Modules
    • Ant tasks, Maven 1, Maven 2 plugins.
    • Intellij IDEA and Netbeans plugins are in the sandbox.

    First you have to decide if your tomcat server run locally or remotely as this influence the way you’ll configure your pom.xml

    Below is an example of a standard architecture

    |---MyApplication
    |           |- ear       (ear)
    |           |- service (jar)
    |           |- client    (jar)
    |           |- web      (war)
    |           |- integration (jar)

    The most interesting Maven module, which will be the subject of this article, and the next one is describing how to automate the deployment of a war to Tomcat and later on running integration tests using Selenium.

    'Integration testing'  is the activity of software testing in which individual software modules are combined and tested as a group. It occurs after unit testing and before system testing. Integration testing takes as its input modules that have been unit tested, groups them in larger aggregates, applies tests defined in an integration test plan to those aggregates, and delivers as its output the integrated system ready for system testing. [WikiPedia]

    Deploying to Tomcat running locally

    Locally mean running on your development machine, at localhost 8080 or on any other port. Maven has the concept of a 'phase' which can be thought of a collection of goals. Hence here we are specifying that during the
    ’pre-integration-test’ phase first deploy the web app to the container specific folder and then start the container. Both 'deployer-deploy' and 'start' are cargo specific goals. The code below is already ready for integration testing!

    <!—Example of Configuration –>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.cargo</groupId>
                <artifactId>cargo-maven2-plugin</artifactId>
                <configuration>
                    <wait>true</wait>
                    <container>
                        <containerId>tomcat6x</containerId>
                        <type>installed</type>
                        <home>${catalina.home}</home>
                    </container>
                    <configuration>
                        <type>existing</type> 
                        <home>${catalina.home}</home>
                    <properties>
                            <cargo.tomcat.manager.url>https://yourhost/manager</cargo.tomcat.manager.url>
                            <cargo.remote.username>ManagerAdminLogin</cargo.remote.username>
                            <cargo.remote.password>ManagerAdminPassword</cargo.remote.password>
                        </properties>
                    </configuration>
                    <deployer>
                        <type>installed</type>
                        <deployables>
                            <deployable>
                                <groupId>com.waltercedric</groupId>
                                <artifactId>myapplication-web</artifactId>
                                <type>war</type>
                            </deployable>
                        </deployables>
                    </deployer>
                </configuration>
                <executions>
                    <execution>
                        <id>start-container</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>deployer-deploy</goal>
                            <!--  Only local containers can be started 
                            <goal>start</goal>
                            -->
                        </goals>
                    </execution>
                    <execution>
                        <id>stop-container</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>deployer-undeploy</goal>
                            <!--  Only local containers can be started 
                            <goal>stop</goal>
                            -->
                        </goals>
                    </execution>
                    <execution>
                        <id>verify-deploy</id>
                        <phase>install</phase>
                        <goals>
                            <goal>deployer-deploy</goal>
                        </goals>
                    </execution> 
                    <execution>
                        <id>clean-undeploy</id>
                        <phase>pre-clean</phase>
                        <goals>
                            <goal>deployer-undeploy</goal>
                            <!--  Only local containers can be started 
                            <goal>stop</goal>
                            -->
                        </goals>
                    </execution> 
    
                </executions>
            </plugin>
        </plugins>
    </build>

    Deploying to Tomcat running remotely

    The code slightly change:

    • You can NOT start and stop Tomcat running remotely, only deploy and un deploy your web application
    • ‘installed’ is replaced by ‘remote’
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.cargo</groupId>
                <artifactId>cargo-maven2-plugin</artifactId>
                <configuration>
                    <wait>true</wait>
                    <container>
                        <containerId>tomcat6x</containerId>
                        <type>remote</type>
                    </container>
                    <configuration>
                        <type>remote</type> 
                        <properties>
                            <cargo.tomcat.manager.url>https://yourhost/manager</cargo.tomcat.manager.url>
                            <cargo.remote.username>ManagerAdminLogin</cargo.remote.username>
                            <cargo.remote.password>ManagerAdminPassword</cargo.remote.password>
                        </properties>
                    </configuration>
                    <deployer>
                        <type>installed</type>
                        <deployables>
                            <deployable>
                                <groupId>com.waltercedric</groupId>
                                <artifactId>myapplication-web</artifactId>
                                <type>war</type>
                            </deployable>
                        </deployables>
                    </deployer>
                </configuration>
                <executions>
                    <execution>
                        <id>start-container</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>deployer-deploy</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>stop-container</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>deployer-undeploy</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>verify-deploy</id>
                        <phase>install</phase>
                        <goals>
                            <goal>deployer-deploy</goal>
                        </goals>
                    </execution> 
                    <execution>
                        <id>clean-undeploy</id>
                        <phase>pre-clean</phase>
                        <goals>
                            <goal>deployer-undeploy</goal>
                        </goals>
                    </execution> 
                </executions>
            </plugin>
        </plugins>
    </build>

    If you don’t want to let cargo deploy your web application artefact under the default name myapplication-web-0.0.1.SNAPSHOT.war, you can add the following to the deployable section of cargo

    <plugin>
        <groupId>org.codehaus.cargo</groupId>
        <artifactId>cargo-maven2-plugin</artifactId>
        <configuration>
            <deployer>
                <deployables>
                    <deployable>
                        <properties>
                            <context>mywebapp</context>
                        </properties>
                    </deployable>
                </deployables>
            </deployer>
        </configuration>
    </plugin>

    So you’ll be able to access your web application with http://localhost/mywebapp instead of http://localhost/myapplication-web-0.0.1.SNAPSHOT

    From now on, any phase higher than ’pre-integration-test’ will trigger the deployment to your web application to any tomcat, jboss or weblogic container. As a reminder, here are the major phase of Maven, You can put many of them just separate by a space in run as - goals

    • validate - validate the project is correct and all necessary information is available
    • generate-sources - generate any source code for inclusion in compilation
    • process-sources - process the source code, for example to filter any values
    • generate-resources - generate resources for inclusion in the package
    • process-resources - copy and process the resources into the destination directory, ready for packaging
    • compile - compile the source code of the project
    • process-classes - post-process the generated files from compilation, for example to do byte code enhancement on Java classes
    • generate-test-sources - generate any test source code for inclusion in compilation
    • process-test-sources - process the test source code, for example to filter any values
    • generate-test-resources - create resources for testing
    • process-test-resources - copy and process the resources into the test destination directory
    • test-compile - compile the test source code into the test destination directory
    • test - run tests using a suitable unit testing framework. These tests should not require the code be packaged or deployed
    • prepare-package - perform any operations necessary to prepare a package before the actual packaging.
    • package - take the compiled code and package it in its distributable format, such as a JAR
    • pre-integration-test - perform actions required before integration tests are executed. This may involve things such as setting up the required environment
    • integration-test - process and deploy the package if necessary into an environment where integration tests can be run
    • post-integration-test - perform actions required after integration tests have been executed. This may including cleaning up the environment
    • verify - run any checks to verify the package is valid and meets quality criteria
    • install - install the package into the local repository, for use as a dependency in other projects locally
    • deploy - done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects

    I recommend you also to use:

    • Maven profiles (triggered by environment, Linux, Windows, DEV, TEST, PROD)
    • Key value pair for sensitive data (login, password)
    • Key value pair for contextual data (URL’s of management console)

    All of these data can be saved in your Maven settings.xml or given by system variables at build time.

  • joomla_cms

    php.logo 

    Digital watermarking is the process of possibly irreversibly embedding information into a digital signal. The signal may be audio, pictures or video, for example. If the signal is copied, then the information is also carried in the copy. In visible watermarking, the information is visible in the picture or video. Typically, the information is text or a logo which identifies the owner of the media.[Wikipedia]

    If you decide to go with an online watermarking, you can let watermark picture on the fly using php and .htaccess (at the cost of additional CPU server resources).

    Why Watermarking pictures?

    There is a lot of reasons, among others:

    • To limit images stealing, advanced users will still be able to crop/blur your watermark through!
    • To drive more new users/returning visitors to your site, anybody using your images in a forums may want to visit your site if the watermark can be read (don’t use complex logo, except if you have a well known brand)
    • To advertise your online work,

    This article is a follow up of a previous article presenting how to watermark picture offline (definitive watermarking) using ImageMagick bash script. A lot of steps described there still apply

    Features

    • Watermark pictures on the fly as soon as they are bigger than 500 pixels in width (PHP)
    • Watermark all or only pictures that are hot linked from outside your blog, for example in forums, other blogs (.htaccess setting)
    • Don’t watermark pictures hot linked from search images engine: Google images search or other (.htaccess setting)
    • Easily extensible to your needs: support multiple watermark pictures based on original image size.

    Installation

    create a file .htaccess with the following content, I recommend you to save it at the root of Joomla!® directory structure, you can merge this file with the one provided by Joomla!

    # Uncomment next line to avoid that watermark apply on your
    # site, replace yoursite.com with you Joomla! base
    rewritecond %{http_referer} !^
    http://([^.]*[.]*)?yoursite.com/ [nc]

    # Uncomment next line to avoid applying watermark in Google images
    # search, copy as many lines as needed if you would like to also add Bing, Yahoo, etc...
    rewritecond %{http_referer} !^
    http://(www.)?google.com/ [nc]


    RewriteCond %{REQUEST_FILENAME} –f

    # Path to the watermark.php script, and list of supported images
    RewriteRule \.(gif|jpeg|jpg|png)$ /images/watermark.php [QSA,NC]

    watermark.php script

    Save this script into Joomla!® /images directory, under /images/watermark.php

    Decide at which size you want to protect your images, here starting at 500pixels width, I will apply a watermark overlay in the left corner of the image.

    <?php 
    
      $path = $_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI']; 
    
      $image = imagecreatefromstring(file_get_contents($path)); 
    
      $w = imagesx($image); 
    
      if ($w > 500) { 
    
        $h = imagesy($image); 
    
        $watermark = imagecreatefrompng('watermark.png'); 
    
        $ww = imagesx($watermark); 
    
        $wh = imagesy($watermark); 
    
        imagecopy($image, $watermark, $w-$ww, $h-$wh, 0, 0, $ww, $wh); 
    
      } 
    
      header('Content-type: image/jpeg'); 
    
      imagejpeg($image); 
    
      exit(); 
    
    ?>

    Caveats

    It cost CPU and depending how you set your .htaccess may still allow users to steal images without watermark.

  • TeamCity is a Continuous integration and build management server from JetBrains.

    As the first build step, create a custom script that reads %build.number%, and uses service messages to append the short GIT hash programmatically.

    image

    Here’s an example using a bash script pasted right into the TeamCity GUI (Runner type: Command Line, Run: Custom Script):

    GIT_HASH=%build.vcs.number%
    GIT_HASH_SHORT=${GIT_HASH:0:7}
    echo "#teamcity[buildNumber '#${GIT_HASH_SHORT}']"
    &160;
  • sony_playstation_ps3

    Guide how to replace PS3 Laser Lens  
            version 1.0

    ps3.change.lens

    Attention: This operation will void your warranty!!! I recommend you to send it to
                      SONY if bought your PS3 less than a year ago.
    Attention: While this operation require no particular knowledge, don't try it if you
                      have no patience and feel not confident enough!
    Attention: Look at other tutorials at the end of my article before starting, I did not represent
                      all steps in details. Use them to complete missing steps (this is my brother's PS3, mine
                      may die also soon, will complete tutorial then)

     

    DISCLAIMER: This tutorial is for information purposes, and I am not responsible or can
    be held responsible if you screw up your PS3 by following this tutorial. Make sure the
    PS3 is unplugged from mains power AT ALL TIMES. Mains power is dangerous!
    Dismantle the Playstation 3 console and follow this tutorial at your own risk!


    Duration: 25 minutes
    Cost: 35 euro (SONY ask 200 euro, some shops 99 euro with 3 months warranty) 

    Tool required:

     
    ps3.change.lens_torx_set
    Torx screwdriver TR10 :ps3.change.lens_torx_tr10
    ps3.change.lens_000 Small flathead screw driver + Philips screwdriver
    PS3.Laser.Lens.KES400AAA Order part: KES-400AAA on Internet or search for "ps3 lens" on EBAY.
      Big flat space well lit

     

    Operation done on 18 July 2008, PS3 fully working.

    ps3.change.lens_001 Prerequisites :-)
    ps3.change.lens_002 Remove the 8 screws, slightly lift up the back corners of the top half of the console. There is there 2 small clips near the back you may need to undo with a small screw driver. Now the top of the console should just lift off
    ps3.change.lens_003 1. Lift the drive.
    2. Unplug the power supply near the front right side of drive.
    3. Remove the wide ribbon cable connecting the drive to the motherboard.
     ps3.change.lens_004 details of power supply near the front right side of drive.
    ps3.change.lens_005 Remove the main board by removing the screws.

    Put them beside in the same order as you did remove them. This will help a lot when you put everything back!

    You can now remove the 2 metal plate that encase the ps3 BLU-RAY drive.
    ps3.change.lens_006 Remove the white plastic part that maintain the DVD in place and put beside.

    You now see the drive plastic box.

    More screws to remove to to open that black case.
    ps3.change.lens_007 remove these screws to be able to pull up the old ps3 lens out of the plastic case
    SANYO DIGITAL CAMERA Lens details
    ps3.change.lens_008 the old lens is now ready to die.

    Metal axes can be removed ad will have to be transferred to the new lens
    ps3.change.lens_009 On the new lens, put the cable ribbon, by first pulling up the black clip (A), then insert the ribbon (B) and pull back the black clip .
    ps3.change.lens_010 On the old lens, the white plastic part has to be transferred to the new lens as well.
    ps3.change.lens_011 One screw to remove
    ps3.change.lens_0660 Put axes on new lens and place it back in case.
      screw everything back
       

     

    Comments, corrections are welcome in the new forum Board "Changing your PS3 lens"

    Other  tutorials

  • A seen on TV,  the Fagioli group is specialized in moving huge and heavy objects: 2000, 3000, 5000, 6000 tons!

    Fagioli can offer specialist services, which deal with oversized and over-weight cargo that cannot be transported by conventional methods. These operations cover on a turn key basis all operations from the conceptual engineering design provided in-house, through to positioning onto foundation including any lifting and logistics operations.

     

    HTR_016
    FAGIOLI - TRANSPORT OF A 2100 TON BLAST FURNACE SECTION

    HTR_020
    TRANSPORT OF A 4800 TON MODULE

    HTR_021

    TRANSPORT OF A 6000 TON MILITARY SHIP

    But what is even more interesting is their in house development: SELF PROPELLED MODULAR TRANSPORTERS (SPMT's)

    Self-propelled modular transporters (SPMTs) are multi-axle trailers designed for the transportation of large and heavy cargoes. The SPMT's are designed in modular construction and can be coupled side to side and end to end, or remote units can be operated as a single transporters via radio controls.

    The more heavy the more SPMT they put in parallel: crazy!

    Watch more video and get more info at http://www.fagioli.com


  •  Overall view of my 1st caliber

    24.08.2002 Add a dual battery system for more safety. I have no heli with only one battery. Here is why:

    Problems 1 battery pack 2 packs +
    mechanic
    Switches
    2 packs +
    Electronic
    switch
    Additional cost of system reference + 55€ + 180€
    Open circuit between battery and switch's pack Failure Redundant Redundant
    Open circuit in one of the pack Failure Redundant Redundant
    Battery short circuit in one pack Failure Failure Redundant
    One pack not fully charged Failure Redundant Redundant
    Switch failure (assumes between RX and backup sys) Failure Redundant Failure
    Battery connector from backup system to the receiver Failure Redundant Failure

    Build yourself a dual switch

  • Resources such as JavaScript and CSS files can be compressed before being sent to the browser, improving network efficiencies and application load time in certain case. If you are not using Apache with mod_deflate or nginx in front of your web application, you may need to implement resources compression yourself….

    Wait! don’t start writing your own filter to compress files like CSS, html, txt, javascript it is way more difficult than you think to properly handle http response headers and do proper handling of mime type and caching. In one sentence don’t start reinventing the wheel: use ehcache for example.

    Ehcache is an open source, standards-based cache used to boost performance, offload the database and simplify scalability. Ehcache is robust, proven and full-featured and this has made it the most widely-used Java-based cache. It can scale from in-process with one or more nodes through to a mixed in-process/out-of-process configuration with terabyte-sized caches. For applications needing a coherent distributed cache, Ehcache uses the open source Terracotta Sever Array.

    in the pom.xml of your project add the following dependency to ehcache-web

    <dependency>
        <groupId>net.sf.ehcache</groupId>
        <artifactId>ehcache-web</artifactId>
        <version>2.0.4</version>
    </dependency>

    in your web.xml, add a filter and configure it properly

    <filter>
     <filter-name>CompressionFilter</filter-name>
     <filter-class>net.sf.ehcache.constructs.web.filter.GzipFilter</filter-class>
    </filter>
    <filter-mapping>
     <filter-name>CompressionFilter</filter-name>
     <url-pattern>*.css</url-pattern>
    </filter-mapping>
    <filter-mapping>
     <filter-name>CompressionFilter</filter-name>
     <url-pattern>*.html</url-pattern>
    </filter-mapping>
    <filter-mapping>
     <filter-name>CompressionFilter</filter-name>
     <url-pattern>*.js</url-pattern>
    </filter-mapping>
    <filter-mapping>
     <filter-name>CompressionFilter</filter-name>
     <url-pattern>/*</url-pattern>
    </filter-mapping>

    Read more at EhCache Web Caching page.

    As a bonus, I provide you also below the configuration for the famous challenger HTTP server nginx

     ##
     # Gzip Settings
     ##
     gzip  on;
     gzip_http_version 1.1;
     gzip_vary on;
     gzip_comp_level 6;
     gzip_proxied any;
     gzip_types text/plain text/css application/json application/x-javascript \
    text/xml application/xml application/xml+rss text/javascript \
    application/javascript text/x-js; gzip_buffers 16 8k; gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    &160;

    or for the number one HTTP server Apache using mod deflate /etc/apache2/conf.d/deflate.conf

    <Location />
    # Insert filter
    SetOutputFilter DEFLATE
    
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/atom_xml
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE text/html
    
    # Netscape 4.x has some problems...
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    
    # Netscape 4.06-4.08 have some more problems
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    
    # MSIE masquerades as Netscape, but it is fine
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    # Don't compress images
    SetEnvIfNoCase Request_URI \
    \.(?:gif|jpe?g|png)$ no-gzip dont-vary
    
    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary
    </Location>
  • The PDT project is working towards providing a PHP Development Environment framework. This project was formerly known as PHP IDE.

    Make Eclipse PDT work for Joomla development

    Install a PHP debugger

    In order to be able to perform debugging using eclipse PDT, you must download one of the following extra packages:&160; XDEBUG or ZEND debugger. I was not able to get the debugger running with XDEBUG even after reading many tutorials and trial error approach. Both packages are free, and it has work nicely for me with ZEND debugger after 5 minutes...

    Unfortunately, XDEBUG/ZEND can not be packaged with PDT due to license restrictions, so both tools are not just running out of the box without few efforts.

    PDT and Zend Debugger

    Download

    PDT + Zend in one package thanks to Zend.com (118MB), highly recommended

    OR PDT (105MB) and add Zend debugger through software update later

    • Open Eclipse and go to Help-> Software Updates-> Find and Install
    • Select "Search for new features to install" and click "Next"
    • Create a New Remote Site with the following details:
    • Name: PDT
    • URL: http://downloads.zend.com/pdt
    • Check the PDT box and click "Next" to start the installation

    XAMPP, Zend debugger working together

    open the php.ini located at \xampp\apache\bin\php.ini

    and add the following

    [DEBUGGER]
    zend_extension_ts=
    E:\php\bin\eclipse\plugins\org.zend.php.debug.debugger.win32.x86_5.2.15.v20081217\resources\php5\ZendDebugger.dll
    zend_debugger.allow_hosts=127.0.0.1/192.168.1.100
    zend_debugger.expose_remotely=always

    Notes:

    • Only one key zend_extension_ts is allowed per php.ini file, un-comment all other or it wont work,
    • Attention: I did not move ZendDebugger.dll but use the one coming with eclipse Zend plugin, this may cause issues, if you update this plugin and the path change...

    Restart XAMPP apache

    By going to http://localhost/xampp/phpinfo.php check that you have a section Zend Debugger

    zend.debugger.active.in.xampp

    Put now a breakpoint in index.php of any Joomla! installation or deeper in any component you want to debug

    And right click on index.php, debug as PHP Web Page (Alt-Shift-D, W)

    Attention

    While the first page get properly rendered in the internal browser of eclipse PDT, I was getting some strange rendering issues (html code produced look fine), by using an external browser like Chrome, Firefox, the problem has disappear.

    PDT and XDebug

    Installing with PEAR/PECL is as easy as opening a command prompt and typing

    # \xampp\php\pecl install xdebug

    open the php.ini located at \xampp\apache\bin\php.ini

    and un-comment the following

    extension=php_xdebug.dll

    and

    [XDebug]
    ;; Only Zend OR (!) XDebug
    zend_extension_ts="e:\xampp\php\ext\php_xdebug.dll"
    xdebug.remote_enable=1
    xdebug.remote_host=localhost
    xdebug.remote_port=9001
    xdebug.remote_handler=dbgp
    xdebug.profiler_enable=0
    xdebug.profiler_output_dir="\xampp\tmp"

    Caveats:

    1. Modify the correct php.ini file, check the page phpinfo, normally the right php.ini is located at \xampp\apache\bin\php.ini
    2. You need to comment out any other references to &8220;zend_extension_ts&8221; in the php.ini file (the zend optimizer use it already as default)
    3. Restart apache, and check the page http://localhost/xampp/phpinfo.php to make sure XDebug has been successfully installed

    debugging AkoBookPlus:

    debugging.joomla.components

    &160;

    Add subversion plugin

    Install subversive by pointing the update manager to subversive update site

    svn.subversive.install

    You need also to install SVN connectors by adding a new update site:

    http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/ - [required] Subversive SVN Connectors

    svn.subversive.install.connector&160;

    Eclipse will restart, you should be able to browse www.joomlaCode.org repositories.

    Happy Joomla! development and PHP debugging!

  • apache_maven

    This issue has turn me upside down a long time. In fact in the official Google Group http://groups.google.de/group/maven-for-php/ I was not the only one to have this issue.

    I did try the following, and it is always good to check first

    • Checking PHP version,
    • Starting Maven with -X for having more debug information
    • Testing it in Eclipse + M2Eclipse on windows, was working there,
    • Comparing calculated PHP include path on Windows and Linux: they were identical in this case

    Only my Linux box was not working. . .(http://teamcity.waltercedric.com)

    After that I did materialize the eclipse project of maven-php-plugin and even built a custom version that I’ve deployed without any effort to my Artifactory (http://maven.waltercedric.com)

    And what is the solution?

    it my server configuration and paranoia :-)

    open your php.ini, ideally the right one, don’t put your server at risks: You may have many under Linux, especially if you use plesk or cpanel 

    • cli at /etc/php5/cli/php.ini
    • apache2, /etc/php5/apache2/php.ini
    • fastcgi at /etc/php5/fastcgi/php.ini

    location most of the time

    /etc/php5/cli/php.ini

    and add the directory where your build server make a checkout...

    ; open_basedir, if set, limits all file operations to the defined directory
    ; and below.  This directive makes most sense if used in a per-directory
    ; or per-virtualhost web server configuration file. This directive is
    ; *NOT* affected by whether Safe Mode is turned On or Off.
    open_basedir = /www/vhosts:/tmp:/xxxx/yyyy/

    Next step is to put Joomla! 1.6 and all their PHPUnit tests a run along with Selenium. May also need to  patch Maven for PHP to better support Tests reporting like Surefire.

  • eclipse&160;

    A very little trick that allow you to quickly run any operation involving a DOS command on an Eclipse project. Go to the external launcher, and create a new configuration.

    This trick may be useful for running your Maven set of command without any dependencies to M2Eclipse.

    &160;

    &160;

    Location:&160; {ENV_VAR:COMSPEC}
    Working Directory: {project_loc}

    eclipse.open.command.line

    {ENV_VAR}

    Returns the value of an environment variable. An environment variable name must be specified as an argument.

    command.line.prompt

  • apache_maven

    We had serious performance problems with MAVEN in our environment. It seems to be a recurrent problem
    for MAVEN... anyway I did came through the following changes...the 2.0.9.db1 Maven2 patch make really
    Maven fly!

    General settings to speed up Maven:

    • More memory for Maven process, change the launcher of eclipse to set MAVEN_OPTS like this:
      -DMAVEN_OPTS="-Xms64m –Xmx128m"
    • Use the latest version of Maven, but be careful of regressions! the latest as for today is 2.0.9
    • There is a patch available for Maven 2.0.9, which speed up build by 40%. It is just simply day and
      night! try it, you'll love it! Basically Don Brown alter MAVEN2 2.0.9 to

    General settings to speed up Eclipse:

    1. Use javaw.exe to start eclipse and not java.exe (more for console base program with a lot of feedback),
      while javaw.exe is more for graphical environment.
    2. Aggressive JIT and double core processors should use:  
       -XX:-UseParallelGC -XX:+AggressiveOpts -XX:-UseConcMarkSweepGC -XX:+UseFastAccessorMethods
    3. Give more memory, MORE MEMORY for eclipse, on a 4GB machine, these are my settings: 
      -Xms768m -Xmx1024m -XX:MaxPermSize=256m
    4. Reduce the number of warning reported by eclipse per compilation unit (class), default is 100, reduce it to 10.
      It help nobody to see a workspace slowing down because of too many warning logging.
      Remove the warnings instead ;-)
    5. SVN console with subversive is too verbose as default, go to eclipse preferences - Team – SVN - Console.
      Logging SVN errors should be enough.
    6. Use a Defragmenter! NTFS fragment fast with so many small files in workspace, every 2 week is a good practice.
    7. I am using Java 1.6u10 (BETA!) and have experience no crash till now,
      being on the edge can be costly in time through. Maven forking should benefit from the reduce java kernel
      size and bootstrap time
  • I will try to keep an history of all my previous machine on this page...yes it is just a nerd/geek behavior...

    geek-inside

    In 15 years...

    • Cost in euro are in green, are similar in amount, you just get more size, disk, speed for your buck
    • 1208 times more IPS and my PC is still sometimes hanging (In order Vista, XP, Linux I look at you) :-(
    • 81 times more disk space!
    • Power consumption 360 watts today :-(
    • PC are still slower than what I expect...

     

    Instructions per second (IPS) is a measure of a computer's processor speed. Many reported IPS
    values have represented "peak" execution rates on artificial instruction sequences with few branches,
    whereas realistic workloads consist of a mix of instructions and even applications, some of which take
    longer to execute than others. The performance of the memory hierarchy also greatly affects processor
    performance, an issue barely considered in MIPS calculations. Because of these problems, researchers
    created standardized tests such as SPECint to (maybe) measure the real effective performance in
    commonly used applications, and raw IPS has fallen into disuse. [WikiPedia]

  • hosts.file The hosts file is a computer file used by an operating system to map hostnames to IP addresses. This method is one of several methods used by an operating system to locate network nodes on a computer network. Spybot Search and Destroy is using this technique when you click on immunize button behind the scene.

    Found at http://someonewhocares.org/hosts/

    Use this file to prevent your computer from connecting to selected internet hosts. This is an easy and effective way to

    • protect you from many types of spyware,
    • reduces bandwidth use,
    • blocks certain pop-up traps,
    • prevents user tracking by way of "web bugs" embedded in spam,
    • provides partial protection to IE from certain web-based exploits
    • blocks most advertising you would otherwise be subjected to on the internet.

    There is a version of this file that uses 0.0.0.0 instead of 127.0.0.1 available at http://someonewhocares.org/hosts/zero/. On some machines this may run minutely faster, however the zero version may not be compatible with all systems.

    This file must be saved as a text file with no extension. (This means it that the file name should be exactly as below, without a ".txt" appended.). Let me repeat, the file should be named "hosts" NOT "hosts.txt".

    For Windows 9x and ME

    place this file at "C:\Windows\hosts"

    For NT, Win2K and XP

    use "C:\windows\system32\drivers\etc\hosts" or "C:\winnt\system32\drivers\etc\hosts"

    For Linux, Unix, or OS X place this file at "/etc/hosts". You will require root access to do this. Saving this file to "~/hosts" will allow you to run something like "sudo cp ~/hosts /etc/hosts".

    Ubuntu

    Users who experience trouble with apt-get should consult http://ubuntuforums.org/archive/index.php/t-613521.html

    OS/2

    Copy the file to "%ETC%\HOSTS" and in the CONFIG.SYS file, ensure that the line "SET USE_HOSTS_FIRST=1" is included.

    BeOS / Zeta / Haiku

    Place it at "/boot/beos/etc/hosts"

    Netware system

    The location is System\etc\hosts"

    For Macintosh (pre OS X)

    Place it in the Mac System Folder or Preferences folder and reboot. (something like HD:System Folder:Preferences:Hosts)

    Alternatively you can save it elsewhere on your machine, then go to the TCP/IP control panel and click on "Select hosts file" to read it in.As well, note that the format is different on old macs, soplease visit http://someonewhocares.org/hosts/mac/ for mac format

    If there is a domain name you would rather never see, simply add a line that reads "127.0.0.1 machine.domain.tld". This will have the effect of redirecting any requests to that host to your own computer. For example this will prevent your browser from downloading banner ads, or sendingyour information back to a company.

  • gmail-logo&160; hotmail_logo

    A small trick that will let you consult your hotmail message from GMAIL and as such will be a lot more easier to consult on the iPhone.

    Gmail's Mail Fetcher can download messages from up to five other email accounts, centralizing all your email in Gmail. The tabs above have information on setting up Mail Fetcher, as well as troubleshooting tips for the common problems users face.

    Note: You don’t need any premium hotmail account, even a free account at hotmail will work! One more time, thanks Google!

    Log into GMAIL,go to settings, under “Get mail from other accounts”

    add.hotmail.to.gmail.for.iphone.00

    Enter the email address of the account to get mail from

    add.hotmail.to.gmail.for.iphone&160;&160;

    Enter the mail settings for your mailbox, customize

    add.hotmail.to.gmail.for.iphone.01

    We are nearly finished

    add.hotmail.to.gmail.for.iphone.02

  • i.will.use.google.before.asking.dumb.questions

    Went through this interesting article “How To Ask Questions The Smart Way”, while a bit old (2006), it is full of very good advices for asking questions the smart way (and also sometimes finding an answer on your own).

    In the world ofhackers, the kind of answers you get to your technical questions depends as much on the way you ask the questions as on the difficulty of developing the answer. This guide will teach you how to ask questions in a way more likely to get you a satisfactory answer.
    Now that use of open source has become widespread, you can often get as good answers from other, more experienced users as from hackers. This is a Good Thing; users tend to be just a little bit more tolerant of the kind of failures newbie's often have. Still, treating experienced users like hackers in the ways we recommend here will generally be the most effective way to get useful answers out of them, too.
    The first thing to understand is that hackers actually like hard problems and good, thought-provoking questions about them. If we didn't, we wouldn't be here. If you give us an interesting question to chew on we'll be grateful to you; good questions are a stimulus and a gift. Good questions help us develop our understanding, and often reveal problems we might not have noticed or thought about otherwise. Among hackers, “Good question!” is a strong and sincere compliment.

  • subversion.logo

    If you are using Subversion/CVS, you might have come across the issue where multiple developers working on a set of files are committing without any comments.

    Subversion’s hook scripts provide a powerful way to associate actions with repository events. For example, the pre-commit hook allows you to check — and possibly abort — a transaction before it actually gets committed. I will provide you now two easy Unix bash scripts  that avoid bad developer behaviors:

    • The first one “checkCommentNotEmpty.sh” is for checking that nobody submit an empty SVN commit comment
    • The second one “checkCommentSyntax.sh” is able to enforce SVN commit comment pattern using regular expressions

    Creating and Installing a Hook Script

    Your Subversion repository already has some template hook scripts. For example, the pre-commit template is in PATH_TO_REPOS/hooks/pre-commit.tmpl. These templates contain instructions on what the hook script does and what parameters it can expect.

    You can hook your own script on the following events

    • start-commit Before the commit transaction starts
    • pre-commit After the commit transaction starts but before the transaction is committed
    • post-commit After the commit transaction completes
    • pre-revprop-change Before a revision property is changed Repository Path,
    • post-revprop-change: After a revision property is changed Repository Path
    • pre-lock: Before the lock being acquired
    • post-lock: After the lock being acquired

    You’ll find examples in the hook directory named

    • post-commit.tmpl
    • pre-unlock.tmpl
    • post-lock.tmpl
    • pre-commit.tmpl
    • start-commit.tmpl
    • post-revprop-change.tmpl
    • pre-lock.tmpl
    • post-unlock.tmpl
    • pre-revprop-change.tmpl

    If you cant find them, brute force your server to locate them

    # find / –name pre-commit

    or

    # locate pre-commit

    On Debian you will find them at

    /data/svn-repos/{yourRepository}/hooks

    Create a file pre-commit with that content, nothing force you to put a huge bash script in pre-commit. In my example below, I prefer to divide pre-commit checks in multiple files. The pre-commit hook gives you a way to catch the transaction before it becomes a revision. Subversion passes this hook two parameters:

    1. the path to the root of the repository
    2. the transaction identifier
    #!/bin/sh
    set -e
    /data/svn-repos/{yourRepository}/hooks/checkCommentNotEmpty.sh "$1" "$2"
    /data/svn-repos/{yourRepository}/hooks/checkCommentSyntax.sh "$1" "$2"

    Note that after installation, every commit will run these two scripts. Check your permissions, scripts have to be runnable for the user (www-data on debian)

    Avoid empty comment in SVN commits

    Save this file in /data/svn-repos/{yourRepository}/hooks/checkCommentNotEmpty.sh

    #!/bin/sh
    REPOS="$1"
    TXN="$2"
    SVNLOOK=/usr/bin/svnlook
    
    if [`$SVNLOOK log -t $TXN $REPOS` != ""]; then
      echo "" 1>&2
      echo "*** Your commit has been blocked because you did not give any log message or your log message was too short." 1>&2
      echo "Please write a log message describing the purpose of your changes and then try committing again." 1>&2
      exit 1
    else
      exit 0
    fi

    Example in Eclipse, if you break the rule

    noEmptySVNCommitComment

    Enforce SVN commit comment pattern using regular expressions

    Save this file in /data/svn-repos/{yourRepository}/hooks/checkCommentSyntax.sh

    This script use Bash script REGEX capabilities, I check against what could be a typical JIRA issues entry

    If any developer try to use a commit statement not starting with for example PRODUCT-xxxx, the commit will be blocked.

    #!/bin/sh
    REPOS="$1"
    TXN="$2"
    SVNLOOK=/usr/bin/svnlook
    regex="PRODUCT-[0-9]*"
    
    if [[ `$SVNLOOK log -t $TXN $REPOS` =~ ${regex} ]]; then
      exit 0
    else
      echo "" 1>&2
      echo "*** Your commit has been blocked because you give an invalid commit comment" 1>&2
      echo "Please make your commit comment start with PRODUCT-XXX" 1>&2
     exit 1
    fi

    Example in Eclipse, if you break the rule

    checkSVNCommitCommentWithRegularExpressions

    Want more?

    You can automated code reviews with Checkstyle using pre-commit script and so Stop rule-breaking code before it enters your code base!

    References

    hook_scripts" target="_blank">http://subversion.tigris.org/tools_contrib.htmlhook_scripts List of some Hook scripts examples written in python/bash

  • Controlling a RC Helicopter