December 20th, 2009
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 | No Comments »
December 20th, 2009
_ 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 | No Comments »
December 19th, 2009
* 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 | No Comments »
November 20th, 2009
<?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 | No Comments »
November 7th, 2009
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 | No Comments »
November 4th, 2009
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
Tags: memcached
Posted in Web Development | No Comments »
November 2nd, 2009
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 | No Comments »
October 29th, 2009
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 | No Comments »
October 17th, 2009
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 | No Comments »
October 17th, 2009
I want to append the string “BYE” to the file test.txt
echo “BYE” >> test.txt
Now, I want to prepend the string “HI” to the file test.txt
echo “HI”|cat - test.txt > /tmp/out && mv /tmp/out test.txt
Posted in Linux Command Line | No Comments »