martedì 31 luglio 2012

Example uses of the Linux Command zip

The following examples illustrate typical uses of the command zip for packaging a set of files into an "archive" file, also called "zip file". The command uses the standard zip file format. The archive files can therefore be used to tranfer files and directories between commonly used operating systems. 

 zip archivefile1 doc1 doc2 doc3
This command creates a file "archivefile1.zip" which contains a copy of the files doc1, doc2, and doc3, located in the current directory. 

 zip archivefile1 *
This command creates a file "archivefile1.zip" which contains a copy of all files in the current directory in compressed form. However, files whose name starts with a "." are not included. The extension ".zip" is added by the program. 

 zip archivefile1 .* *
This version includes the files that start with a dot. But subdirectories are still not included. 

 zip -r archivefile1 .
This copies the current directory, including all subdirectories into the archive file. 

 zip -r archivefile2 papers
This copies the directory "papers", located in the current directory, into "archivefile2.zip". 

 zip -r archivefile3 /home/joe/papers
This copies the directory "/home/joe/papers" into "archivefile3.zip". Since in this case the absolute path is given, it doesn't matter what the current directory is, except that the zip file will be created there.
The command unzip extracts the files from the zip file.
 unzip archivefile1.zip
This writes the files extracted from "archivefile1.zip" to the current directory. 

lunedì 23 luglio 2012

How to find a text file which contains a specific word inside (not in its name) in Ubuntu 12.04

I want to find a text file in my hard disk which contains a specific word. I want to use a graphic application. 


Prior to Ubuntu 12.04 I used to start in the dash an application, I think it was called "Search for file...", whose icon was a magnifying glass. 
In Ubuntu 12.04 :
Install gnome-search-tool.
Open Search for files select Select More Options and

enter image description here

giovedì 19 luglio 2012

How-To create a MySQL database and set privileges to a user


MySQL is a widely spread SQL database management system mainly used on LAMP (Linux/Apache/MySQL/PHP) projects.
In order to be able to use a database, one needs to create: a new database, give access permission to the database server to a database user and finally grant all right to that specific database to this user.
This tutorial will explain how to create a new database and give a user the appropriate grant permissions.
For the purpose of this tutorial, I will explain how to create a database and user for the music player Amarok. In order to index its music collection, Amarok quand use a mysql backend.
The requirement for this set up is to have access to a database. We are going to create a database called amarok which will be accessible from localhost to useramarok idetified by the password amarok....
Obviously, we need to to have a mysql server installed as well as amarok:
$ sudo apt-get install mysql-server amarok
On a default settings, mysql root user do not need a password to authenticate from localhost. In this case, ou can login as root on your mysql server using:
$ mysql -u root
If a password is required, use the extra switch -p:
$ mysql -u root -p
Enter password:
Now that you are logged in, we create a database:
mysql> create database amarokdb;
Query OK, 1 row affected (0.00 sec)
We allow user amarokuser to connect to the server from localhost using the password amarokpasswd:
mysql> grant usage on *.* to amarokuser@localhost identified by 'amarokpasswd';
Query OK, 0 rows affected (0.00 sec)
And finally we grant all privileges on the amarok database to this user:
mysql> grant all privileges on amarokdb.* to amarokuser@localhost ;
Query OK, 0 rows affected (0.00 sec)
And that's it. You can now check that you can connect to the MySQL server using this command:
$ mysql -u amarokuser -p'amarokpasswd' amarokdb
Your MySQL connection id is 12
Server version: 5.0.38-Ubuntu_0ubuntu1-log Ubuntu 7.04 distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

mercoledì 18 luglio 2012

8 Reasons To Use Prestashop For Your Ecommerce Store


Are you not using Prestashop for your e-commerce store? Here’s why you should.

Prestashop is a free, secure and open source e-commerce platform, packed with over 275+ features that will run on just about any web server.
If this isn’t enough to convince you to give it a shot, we’re going to run through 10 reasons to use Prestashop for your e-commerce store.
If you have never heard of Prestashop, you should visit our What is Prestashop? post for a quick run through of what you’re missing out on.
These reasons are by no means the only reasons to use Prestashop. Merchants needs will vary from store to store but I have yet to come across an e-commerce store that could not be run on Prestashop.

1. It’s Open source

Being open source means Prestashop means you can use, change and distribute in whichever way you see fit. If you’re an agency or designer looking for an e-commerce platform then Prestashop could be for you.
You could potentially, and quite easily, use Prestashop as a white label e-commerce platform for your client projects.
If however you’re a merchant, being open source means that there is a huge community of developers ready to help and aid you with your needs, as they actively work with the software and you don’t have to rely on the Prestashop team directly to aid you in your problems (often at a very large fee!).

2. Prestashop Themes and Modules

Prestashop Theme Example
Prestashop Themes and Modules allow you to completely change the look and feel of your store, often for free. You should see our Free Prestashop Themes and Templates post if you’d like to see whats out there.
If you’re willing to put in the time yourself to create something bespoke for your store, this is also very easy to do. Take a look at our Prestashop Theme inspiration gallery, or Matthew Morek’s Prestashop Module Boilerplate to get started creating Prestashop Themes and Modules right away.

3. Prestashop Overrides

Prestashop overrides allow developers to overwrite Prestashop’s core functionality, safe in the knowledge that their changes are not overwritten when Prestashop updates.
You can override Prestashop modules as well as Prestashop’s controllers and classes.
If you’re familiar with WordPress’ filter system this is quite similar.
As a merchant this might sound like nonsense to you, but it means that if a feature is not on your store, a developer can effectively create any feature you wish.

4. Prestashop 1.5

Though the current version, Prestashop 1.4 has been a big success including guest checkout, one page checkout and many more features, but Prestashop 1.5 is just around the corner.
Prestashop 1.5 will bring multi-stores, a better back office interface, processing orders through the admin interface and much more. We wrote about Prestashop 1.5′s upcoming features recently. Now looks like an exciting time to get onboard with using Prestashop.

5. Localisation

Prestashop Translations
Whether your store is in the UK, USA, Germany or the middle east, Prestashop supports your currency and language.
Translations by the Prestashop community and are available from the official website.
Prestashop supports multiple languages and currencies on one store, so your customers can then select their native currency. You need not have multiple stores for different regions, as Prestashop enables you to sell globally with ease.

6. SEO (Search Engine Optimisation)

Ranking well with Google can make or break your store. Luckily, Prestashop is very search engine friendly.
Prestashop features ‘pretty’ URL’s for all of your pages and products, allows custom meta information such as titles and keywords for each product, category and page, auto-generates Google XML Sitemapscanonical URLsand much more.
Your e-commerce store is optimised correctly for Google.

7. Payment Providers

Prestashop comes with a number of payment providers ‘out of the box’ such as PayPal and Google Checkout. If you’re looking for something a bit more specific, such as SagePay or Barclaycard EDPQ, then a number of payment modules available on the Prestashop Addons website covering just about every payment provider.

8. Security

Prestashop SecurityPrestashop is fully PCI Compliant and fully supports Secure Sockets Layer (SSL) certificates. Sensitive information such as passwords and cookies become encrypted and the Prestashop software encourages secure use, such as renaming your admin area’s URL to something more private, at every step of the way.
You can rest assured that Prestashop has put all the best security practices for e-commerce stores into practice on your behalf.

That’s it for now

Is there a particular reason that you use Prestashop for your store, or a reason that you’ve decided against it and instead opted for another e-commerce platform instead? Let us know in the comments below.

domenica 8 luglio 2012

How to install MySQL GUI Tools in 12.04?



  • Go to this page and download this packed :

  • Generic x86 Linux TAR (bundled dependencies) 5.0r12 23.5M
    1. extract the tar.gz with nautilus doble-click :
    enter image description here
    1. Open mysql-gui-tools-5.0 with nautilus an you will see :
    enter image description here
    1. The first time open a terminal an execute ./mysql-administrator
    enter image description here
    if you see one error like that just execute ./mysql-administrator --update-paths
    1. for second time an more just execute via nautilus
    enter image description here
    and voala! happy rocking...

    How to Enable Remote Access to MySQL


    MySQL remote access is disabled by default, but with a few simple steps, you should be up and running with remote MySQL in just a few minutes. This is especially useful when working with multiple developers in an Agile project environment, so that you all use the same data set, and can focus on just writing the application.

    Login to SSH to edit remote MySQL config

    First, we need to edit the mysql config file to accept and bind remote connections to your server. We do this by editing your my.conf file located on most unix systems at /etc/my.conf or /etc/mysql/my.conf. I’m going to hope and assume you know the basics to ssh into your remote server and vi or nano the conf file.
    ssh root@yourserver.com
    vi /etc/my.conf
    

    Replace mysqld Defaults

    You can either set this up as a new connection or override the default, in this case, I replaced the default connection with my own remote connection settings:
    [mysqld]
    bind-address    = 255.112.324.12
    port            = 3306
    user   = mysql
    pid-file        = /var/run/mysqld/mysqld.pid
    socket          = /var/run/mysqld/mysqld.sock
    basedir         = /usr
    datadir         = /var/lib/mysql
    tmpdir          = /tmp
    language        = /usr/share/mysql/English
    # skip-networking
    # skip-external-locking
    
    After your done editing, just save and close the file and restart mysql services:
    # Ubuntu
    service mysql restart
    # Other Unix
    /sbin/init.d/mysql restart
    # Test that your connection is allowed with telnet on your local machine:
    telnet 255.112.324.12 3306
    

    Granting Remote Access to MySQL Users

    Now we’ve created our remote config for MySQL, we have to grant access to this server to other machines.
    mysql -uroot -pMyPass
    CREATE DATABASE mydb;
    # Grant permission to root from any host:
    GRANT ALL ON mydb.* TO root@'%' IDENTIFIED BY 'MyPASSWORD';
    

    Open Up MySQL Remote Ports

    Now that our user has been granted access from any host, all thats left is to make sure our OS will allow connections to the default MySQL port
    /sbin/iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT
    
    And now we should be able to login to our server from our local machine:
    mysql -h255.112.324.12 -uroot -pMyPASSWORD

    sabato 7 luglio 2012

    Compress a Linux or UNIX Directory


    How do I Compress a Whole Linux or UNIX Directory?

    by  on FEBRUARY 11, 2006 · 40 COMMENTS· last updated at APRIL 2, 2008
    Q. How can I compress a whole directory under Linux / UNIX using a shell prompt?
    A. It is very easy to compress a Whole Linux/UNIX directory. It is useful to backup files, email all files, or even to send software you have created to friends. Technically, it is called as a compressed archive. GNU tar command is best for this work. It can be use on remote Linux or UNIX server. It does two things for you:
    => Create the archive
    => Compress the archive
    You need to use tar command as follows (syntax of tar command):
    tar -zcvf archive-name.tar.gz directory-name
    Where,
    • -z: Compress archive using gzip program
    • -c: Create archive
    • -v: Verbose i.e display progress while creating archive
    • -f: Archive File name
    For example, you have directory called /home/jerry/prog and you would like to compress this directory then you can type tar command as follows:
    $ tar -zcvf prog-1-jan-2005.tar.gz /home/jerry/prog
    Above command will create an archive file called prog-1-jan-2005.tar.gz in current directory. If you wish to restore your archive then you need to use following command (it will extract all files in current directory):
    $ tar -zxvf prog-1-jan-2005.tar.gz
    Where,
    • -x: Extract files
    If you wish to extract files in particular directory, for example in /tmp then you need to use following command:
    $ tar -zxvf prog-1-jan-2005.tar.gz -C /tmp
    $ cd /tmp
    $ ls -

    giovedì 5 luglio 2012

    Sedealife.com successful website

    In recent months I have worked with a graphic design studio for the implementation of the new site Sedealife.  

    The site was built with the new grid css project Zurb Foundation. The grid has permission to build a website fully adaptable to smart phones and devices with different resolutions.
     
    The site has had a incredible growth of visitors! Tell me your thoughts on Sedealife.com


    Thanks!


    www.sedealife.com
    www.sedealife.it