Generating filler text in Microsoft Word
By admin | March 14, 2009
If you ever need some filter text that actually will pass spell check (which lorem ipsum does not do, because it is in Latin and not English). This trick works in all Microsoft Word versions and it generates English-validating filler text.
- Place your cursor where you want your free English filter text to appear.
- Type in (as it is, without quotes): “=rand(X,Y)” where X is the number of paragraphs and Y is the number of sentences per paragraph.
- Save your filler text document.
If you found this article helpful or useful, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!
Topics: Windows | 6 Comments »
Removing WordPress post revisions feature
By admin | March 13, 2009
WordPress 2.6 and above’s new feature of post revisions only slows WordPress down and makes it less usable. So here is how to disable post revisions:
- Open wp-config.php in your wordpress installation directory with a text editor.
- Add the line “
define('WP_POST_REVISIONS', false);" anywhere in the file in a new line after the <?php header.
- Save it and upload it to your webserver, overwriting the previous file.
Topics: (X)HTML, Internet | 10 Comments »
Enabling 24-bit colour RDP in Windows 2003
By admin | March 7, 2009
By default, Windows 2003 RDP connections were designed to be limited to 16-bit colour. This makes some of the Windows icons look bad because they were designed to be viewed in 24-bit colour or higher.
- Go to Start -> Run.
- Type in gpedit.msc and click on OK to run the program.
- In the window that opens’ left panel, go to Computer Configuration -> Administrative Templates -> Windows Components -> Terminal Services.
- On the right-hand panel, find the setting that says Limit maximum color depth and double-click it.
- In the dialog box that pops up, select Enabled from the radio buttons at the top of the dialog.
- In the combo box, select “24 bit” or “Client compactable“.
- Click OK.
- Restart the computer for settings to take effect.
Topics: Windows | 6 Comments »
VirtualBox and 16-bit code
By admin | March 5, 2009
Recently while running Windows 98 in a VirtualBox VM I found out that it was extremely slow, even more slower than a newer Microsoft (R) operating system such as Windows XP. Perhaps VirtualBox does not support running Windows 9x and Windows 3.x? VMWare supports Windows 9x and even has a version of VMWare Tools for Windows 9x.
Anyway here are some related links to this bug:
- http://www.virtualbox.org/ticket/20
- http://forums.virtualbox.org/viewtopic.php?t=14400
- http://ubuntuforums.org/showthread.php?t=653165&page=2
- http://forums.virtualbox.org/viewtopic.php?t=244
Topics: Windows | 7 Comments »
Simple Template Engine – your lightweight templating engine in PHP
By admin | February 2, 2009
The Simple Template Engine is a very lightweight template engine to use in PHP if your webhost does not allow you to run something like Smarty. It is simple, lightweight and fast.
To parse a file:
<?php // include simple template engine include("tpl.class.php"); $tpl = new template(); $tpl->assign(Array('content'=>"Hello World from Simple Template Engine!")); // If you want to display it directly $tpl->display('example.tpl'); // If you want to send it to another function/class for more processing some_function($tpl->parse('example.tpl')); ?>
example.tpl is:
<html><head><title>{content}</title></head><body><h1>{content}</h1></body></html>
If you found this article useful or helpful, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!
Topics: (X)HTML, PHP | 5 Comments »
Binaries for rarcrack 0.2 on Microsoft Windows
By admin | January 24, 2009
Note: Were you looking for the Linux binaries?
Rarcrack is a lightweight and powerful tool for cracking lost or forgotten RAR passwords. However, there is no already made package, so here is one pre-made for you. These packages are Windows binaries compiled for x86 and x86_64 machines.
- Download: RAR package (version 0.2, 1.6M)
- Download: ZIP package (version 0.2, 2.0M)
If you wish to compile and install it yourself, you will need to use a patch which allows rarcrack to build on Windows and better integrate rarcrack into Windows.
Topics: Windows | 11 Comments »
Set of patches to allow PHP-GTK2 to compile with PHP6 (incomplete)
By admin | January 24, 2009
If you try to compile PHP-GTK 2.0.1 with PHP 6 (available at the Compdigitec Packaging Department), you will need a series of patches to allow it to compile with PHP 6 because the PHP-GTK generator does not like PHP 6. Here are a set of (incomplete, missing main/phpg_support.c) patches for the PHP-GTK2 generator:
- ext/gtk/gen_atk.c – patch, patched
- ext/gtk/gen_pango.c – patch, patched
- ext/gtk/gen_gdk.c – patch, patched
- ext/gtk/gen_gtk.c – patch, patched
- ext/scintilla/gen_scintilla.c – patch, patched
- main/php_gtk.c – patch, patched
This set of patches is incomplete because the build process will fail on
gcc -I/usr/dev/php-gtk-2.0.1/main -I. -I/usr/dev/php-gtk-2.0.1 -DPHP_ATOM_INC -I/usr/dev/php-gtk-2.0.1/include -I/usr/dev/php-gtk-2.0.1/main -I/usr/dev/php-gtk-2.0.1 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/php -DHAVE_CONFIG_H -g -O0 -Wall -c /usr/dev/php-gtk-2.0.1/main/phpg_support.c -fPIC -DPIC -o main/.libs/phpg_support.o
which it fails with the following output:
/usr/dev/php-gtk-2.0.1/main/phpg_support.c: In function ‘phpg_init_object’:
/usr/dev/php-gtk-2.0.1/main/phpg_support.c:275: error: incompatible type for argument 2 of ‘zend_hash_find’
/usr/dev/php-gtk-2.0.1/main/phpg_support.c: In function ‘phpg_register_class’:
/usr/dev/php-gtk-2.0.1/main/phpg_support.c:300: error: incompatible types in assignment
/usr/dev/php-gtk-2.0.1/main/phpg_support.c:328: error: incompatible type for argument 2 of ‘zend_hash_find’
/usr/dev/php-gtk-2.0.1/main/phpg_support.c:331: error: incompatible type for argument 2 of ‘_zend_hash_add_or_update’
/usr/dev/php-gtk-2.0.1/main/phpg_support.c: In function ‘phpg_register_interface’:
/usr/dev/php-gtk-2.0.1/main/phpg_support.c:353: error: incompatible types in assignment
/usr/dev/php-gtk-2.0.1/main/phpg_support.c: In function ‘unset_abstract_flag’:
/usr/dev/php-gtk-2.0.1/main/phpg_support.c:486: error: incompatible type for argument 2 of ‘zend_hash_quick_exists’
/usr/dev/php-gtk-2.0.1/main/phpg_support.c: In function ‘phpg_handler_marshal’:
/usr/dev/php-gtk-2.0.1/main/phpg_support.c:565: warning: passing argument 3 of ‘zend_is_callable’ from incompatible pointer type
If you found this article useful or helpful, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful or interesting articles!
Topics: PHP | 21 Comments »
How to build a CLI interpreter of PHP in Linux
By admin | January 23, 2009
After you have installed the related development packages (eg libmysqlclient15-dev for MySQL support), configure PHP with the following options:
‐‐prefix=/usr ‐‐enable-debug ‐‐with-openssl ‐‐with-zlib ‐‐with-curl ‐‐enable-ftp ‐‐with-gettext ‐‐with-mhash ‐‐with-mysql ‐‐enable-sockets ‐‐enable-soap ‐‐with-tidy ‐‐enable-zip ‐‐with-xsl ‐‐disable-cgi
If you found this article helpful or useful, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful or interesting articles!
Topics: Linux, PHP | 8 Comments »
System.Windows.Forms in Mono
By admin | January 17, 2009
Mono (http://www.mono-project.com/) is a open source implementation of the .NET Framework. Even though it includes System.Windows.Forms support, it is not installed by default. To install it on Ubuntu/Debian, install the packages libmono-winforms1.0-cil and libmono-winforms2.0-cil. The implementation of System.Windows.Forms in Mono is licensed under the LGPL and this means that it can be used with proprietary (non-free) applications.
Below is a screenshot of Windows Forms on Ubuntu:
If you found this article useful or helpful, please help Compdigitec spread the word! Don’t forget to subscribe to Compdigitec Labs for more interesting articles!
Topics: Linux | 1 Comment »
Binary packages: PHP CLI 5.2.8 and PHP-GTK 2.0.1
By admin | January 14, 2009
Update (2009-05-18): libglade support is not included with this package. It has been deprecated and will soon be replaced with GtkBuilder (coming soon).
If you happen to need a clean CLI package of the latest PHP and a copy of a clean PHP-GTK 2 package, we have compiled a .deb (for Debian, Ubuntu and derivatives) binary version of it here. If you need a .rpm, use alien to convert it.
Requirements
- libtidy-0.99-0
- libmysqlclient15off
- libmhash2
- libcurl4-openssl-dev
Downloads
Note that PHP is a trademark of the PHP Group. PHP is licensed under the PHP License v3.01 and PHP-GTK2 is licensed under the LGPL. If you found this article useful or helpful, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!
Topics: Linux, PHP | 6 Comments »