Install KAlarm on Gnome

You have to install kdepim:
_ yum install kdepim (on RedHat and CentOS)
_ apt-get install kdepim (on Debiam/Ubuntu)

By doing that you can use KAlarm (that actually is a KDE program)

Posted in Linux | Tagged , | Leave a comment

How to Create a Screencast / Videocast / Video

Use Camstudio this way:
_ set all the relevant settings
_ use pause with keyboard shortcuts frequently
_ record different cuts and put them together with VirtualDub

How to do that with VirtualDub?
_ Open a file
_ Video > Direct Stream Copy
_ File > Append video segment
_ File > Save as AVI

Posted in Free Software | Leave a comment

How to Download Movies & Files on Linux

_ Find the torrent with http://www.mininova.org/ or search on Google “Gladiator download torrent”
_ Use Transmission to download the torrent
_ opersubtitles.org

Posted in Linux | Leave a comment

how to install flash in Firefox for CentOS

* Go to youtube.com and try to play a video. You should not be able to play it
* Instead of the video, there should be a link like ‘Install Flash’
* You should be redirected to the Adobe website where you can download an RPM package
* After downloading it, install it with the rpm -i command (as root)
* Then, launch:
sudo yum install flash-plugin

Posted in Redhat / CentOS | Leave a comment

PHP – Nice Debug Trace

<?php
echo parse_backtrace(debug_backtrace());

function parse_backtrace($raw){

$output="";

foreach($raw as $entry){
$output.="\nFile: ".$entry['file']." (Line: ".$entry['line'].")\n";
$output.="Function: ".$entry['function']."\n";
$output.="Args: ".implode(", ", $entry['args'])."\n";
}

return $output;
}
?>

Posted in PHP | Leave a comment

CSS Sprite Online Generator

http://spritegen.website-performance.org/

You can’t include animated gifs in the sprite (otherwise they will be still).

You can’t include list bullets because if the list item is quiet long, the images under the bullet point icon in the sprite will be shown.

Posted in Web Design | Leave a comment

Installing Memcached and PHP Memcache on CentOS and Ubuntu

On CentOS:

Install Memcached
_ yum install memcached
_ /sbin/chkconfig memcached on
_ /etc/init.d/memcached start
_ vim /etc/sysconfig/memcached, and edit:
OPTIONS=”-l 127.0.0.1″

Install PHP extension for Memcache:
_ yum install zlib-devel
This will prevent this error from occurring:
configure: error: memcache support requires ZLIB. Use –with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located
_ pear install pecl/memcache
You should have:
/usr/lib/php/modules/memcache.so
_ echo “extension=memcache.so” > /etc/php.d/memcache.ini
_ /etc/init.d/httpd restart

On Ubuntu:

I’ve installed: apt-get install php5-memcache
I also have memcached installed: apt-get install memcached
restart apache
start memcached

Posted in Web Development | Tagged | Leave a comment

Minify CSS and Javascript Files With YUI Compressor From Linux Command Line

You can download YUICompressor from here:

http://yuilibrary.com/downloads/#yuicompressor

Extract the package

You need Java to execute it (on Ubuntu):

sudo apt-get install sun-java6-jre

To use it, you can execute this on the command line:

cat jquery-*.min.js library.js common.js lists.js tasks.js contexts-mgmt.js keys-mgmt.js | java -jar /home/dan/Desktop/yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar –type js -o all`date +%Y%m%d%I%M%S`.js

Posted in Web Design | Leave a comment

Symfony – Creating a New Plugin

You need this just once:

_ sudo apt-get install php-pear
_ sudo pear channel-discover plugins.symfony-project.com

For every package:
_ Create the file package.xml and put it on the root of the plugin
_ launch:      pear package

To update the repository, use this URL:

http://svn.symfony-project.com/plugins/plugin_name

Posted in Symfony | Leave a comment

MySQL: Deactivate Referential Integrity

If you database has InnoDB tables, you will need to deactivate referential integrity while restoring data. Unfortunately, this can’t be done using the mysqldump utility. To do so, backup your database as you would normally. When done, open the SQL file and add the following statement at the very beginning:

SET FOREIGN_KEY_CHECKS=0;

…and add the following at the end of the file:

SET FOREIGN_KEY_CHECKS=1;

Posted in MySQL | Leave a comment