Menu Close

Author: Luca

Creare un E-Commerce con WordPress e WooCommerce

By marchettidesign.com
WordPress è un CMS dalle grandi potenzialità e negli anni si è sviluppato molto arrivando a poter realizzare le più diverse tipologie di siti. L’unica “pecca” a mio avviso era la mancanza di un plug-in per E-Commerce di alto livello: c’erano vari plug-in, come WP e-Commerce e altri, ma tutti erano difficili da utilizzare e non ben integrati con WordPress.

Dopo anni di attesa il plug-in è arrivato e si chiama WooCommerce.

WooCommerce 2.0 from WooThemes on Vimeo.

How to disable mysql fulltext stopwords?

by nivas.hr
The stopword list is a list of most used words in english language. Common words such as “some”, “little”, “let” or “then” are stopwords and do not match if present in the search string.

Basically, fulltext searching for any of the stopwords would return (almost) all the entries, so MySQL ignores those words to reduce result pollution and for efficiency.

If the word starts with stopword, that word is returned, however if your word IS stopword, you are out of luck. Here is a list of build in stopwords in MySQL 5.0/5.1. Yeah, well this is so very exciting, but whole universe DOES NOT speak and write just english.

Rsync with SSH without prompting for password

by namhuy.net

Rsync is a free software computer program for Unix and Linux like systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate.

** Always use rsync over ssh because rsync does not provide any security while transferring data.

rsync over ssh (with password)

rsync -avz ssh /home/user/ user@192.168.0.100:/backup/user/

To use a different ssh port, e.g., 123:

rsync -avz 'ssh -p 123' /home/user/ user@192.168.0.100:/backup/user/

The terminal will prompt for password before proceed.

To rsync without prompting for password, we can generate a ssh public key and add it to backup server’s ssh authorized keys. Below are the steps.

Email with Postfix, Dovecot and MySQL on Debian 6 (Squeeze)

by linode.com

The Postfix Mail Transfer Agent (MTA) is a high performance open source e-mail server system. This guide will help you get Postfix running on your Debian 6 (Squeeze) Linode, using Dovecot for IMAP/POP3 service and MySQL to store information on virtual domains and users. This guide is largely based on Christoph Haas’s great ISP-style Email Server with Debian-Lenny and Postfix 2.5 guide and HowtoForge Groupware Server With Group-Office, Postfix, Dovecot And SpamAssassin On Debian Lenny (5.0), with some packages omitted.

NOTE: Please read all of the information presented in this guide carefully. There are many files and commands that will need to be edited as part of the setup process: please do not simply copy and paste the example blocks.

Apache – Hide PHP Version (X-Powered-By)

by ducea.com

Applies: apache 1.3.x / apache 2.0.x Required apache module: mod-php4/mod-php5 Scope: php.ini Type: security

Description: How to hide the PHP version to remote requests. Useful: to not disclose un-needed information. As shown in Discover the web server software and version of a remote server anyone can find our valuable information from our apache server banner… This will show you how to suppress the PHP banner X-Powered-By.

Utilizzare operatore ternario per if/else in PHP

by rhadrix.net

Probabilmente avete familiarità con le istruzioni if di PHP. È molto simile alla sua controparte in molti altri linguaggi di programmazione e rappresenta uno dei concetti fondamentali della programmazione. L’istruzione if è facile da capire e facile da padroneggiare. Questo è probabilmente quello che siete abituati a leggere:

if ($eta -->= 18) {
 $messaggio = "Sei maggiorenne!";
 }
 else {
 $messaggio = "Spiacenti, non hai i requisiti!";
 }

Ma c’è un modo per costruire questo concetto e aumentare un po’ le prestazioni di $eta nel processo. Per fare questo si usa l’operatore ternario, che sarebbe una notazione abbreviata per le istruzioni if??.