Simple article rewriter

May 30, 2010 – 4:09 pm
A web based prototype of our article rewriter is available here. You can use it to enliven your (English) text or to create unique content. The script does not connect to a database but crawls the Internet to fetch synonyms. That may take a while, depending on the size of your text. It will only be working as long as the markup of the crawled pages does not change. You still have to do some verb conjugation and noun declination by hand. http://pygmalion.groenefee.nl/articlerewriter

Using a cellphone as a GPRS modem in Ubuntu (8.04)

May 1, 2010 – 8:20 pm
We're using a LG KC 910 Renoir. Connect the phone to your computer over the USB cable. Accept the connection in "PC Suite" mode or something similar (that is: not as a mass storage device). Make sure you have the wvdial package installed. Then type: sudo wvdialconf /etc/wvdial.conf The device (e.g. ttyACM0) will be scanned and the configuration file will be updated. Edit the file as root (sudo vi /etc/wvdial.conf) to include the following lines: Phone = *99# Username = <gprsuser> Password = <gprspassword> Stupid Mode = 1 User and password depend on your operator. You may find what you're looking for on this page: http://www.quickim.com/support/gprs-settings.html. The phone number is the GPRS dial-up and may vary as well. We used these lines to connect to KPN in the Netherlands: Phone = *99# Username = KPN Password = gprs Stupid Mode = 1 Run wvdial to set-up a PPP connection: sudo wvdial You should now have a working connection. DNS server entries have been updated in /etc/resolve.conf You may ...

Drupal 6.x: fatal error in installer

February 3, 2010 – 3:02 pm
During database setup the following fatal error may occur in the web-installer on some systems: Fatal error: Call to undefined function _user_password_dynamic_validation() in /var/www/localhost/htdocs/drupal/install.php on line 727 It can be solved by modifying the system table of your Drupal database: mysql -u -p use UPDATE system SET status = 1 WHERE name = 'block' OR name = 'user' OR name = 'node' OR name = 'filter'; exit Then reload the installer page on which the error occurred and your installation wil continue.

Adding a profile box and posting to the feed on facebook

September 24, 2009 – 6:36 pm
Building an app is easy. At least that's what facebook states. Yet it can be quite a challenge to get started if you're not famliar with facebook's API as the documentation can be quite confusing. Besides, the API seems to be still under development and therefore subject to changes. Chances are that you'll code against deprecated API (e.g. after googling for a solution). We'll demonstrate how to 1) add a profile box to a user profile and 2) post a message to the news feed. After we've set up the application in the Developer App, we'll start with some code to instantiate a facebook object with our unique API key and application secret. This object contains the api_client object with all the API methods we need. It also contains methods to retrieve some values we'll need during the application session, like the user's unique ID. // the facebook client library include_once 'facebook-platform/php/facebook.php'; // Get these ...

Dilution calculator for distillers

January 29, 2009 – 6:29 pm
This very simple Java application calculates the volume of water that needs to be added to an alcoholic distillate to reduce it to bottling strength. Although it's not a very complex calculation of course, life becomes a tidbit easier when the result is just a mouse click away. Invoke as follows: java -jar Dilute.jar To create a desktop launcher provide the full path to the jar file. This tool shouldn't be used for commercial purposes. Note that it doesn't take the phenomenon of contraction into account. Download: Dilute.jar

WordPress LinkRoll Widget

June 29, 2008 – 5:23 pm
The simple widget that runs in our sidebar presents a random selection of stored links. The script parses the <title> tags on the referred pages to name the links. To install it copy the script file to your plugin directory. Activate the widget in WordPress under Plugins, add it under Design->Widgets and customize it. These values can be edited: Title. URL list. This is a text field containing all URLs separated by spaces. The number of random links to display. Download: linkroll.tgz

WordPress AdSense Widget

June 25, 2008 – 2:50 pm
We customized Mike Smullin's AdSense to meet the current specs. Our sidebar shows what it looks like. You can find our version right here. After installation and activation you only need to specify google_ad_client (your publisher ID) and google_ad_slot (to be pasted from the code provided by Google) on the Design->Widgets tab.

Google PageRank in PHP

June 23, 2008 – 2:53 pm
To obtain your PageRank in PHP without a 403 Forbidden error you'll have to calculate the PageRank Checksum and send it with your request. This is the way to go: http://www.hm2k.com/projects/pagerank We have added a simple demo. Get your PageRank right here.

Bypassing a cranky BIOS: boot from CDROM

June 23, 2008 – 11:57 am
After a major crash of our Acer Aspire 1642 the hard disk needed to be replaced. After booting from a life CD we successfully installed Ubuntu Gutsy on the new drive. Unfortunately, after reboot the BIOS appeared to be completely blind to it. A BIOS upgrade would not fix the problem. We worked around the problem by creating a boot CD that would load a kernel, recognize the drive and continue booting the root partion on it. First install the package syslinux. Create a working directory: mkdir bootcd Add isolinux.bin: cp /usr/lib/syslinux/isolinux.bin bootcd Copy the appropriate kernel and ramdisk images to bootcd/linux and bootcd/initrd.img respectively, e.g: cp /boot/vmlinuz-2.6.22-14-generic bootcd/linux cp /boot/initrd.img-2.6.22-14-generic bootcd/initrd.img Create a file bootcd/isolinux.cfg containg a line that will point to your root partition, e.g. /dev/sda1: DEFAULT linux initrd=initrd.img ro root=/dev/sda1 Create an iso image of the working directory: mkisofs -o bootcd.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -hide-rr-moved -R bootcd/ Burn the image to CD. Boot your system.

Pinnacle PCTV USB2 on Suse 10.x

June 4, 2008 – 11:46 pm
Retrieved from the old wiki: To get the Pinnacle USB2 device working you'll need the kernel module for the em28xx chipset. This module is not included in the Suse distribution, so obtain the video4linux package v4l-dvb from linuxtv.org. Note: You do not need the usbvision package. It only supports USB1. The sources of your current kernel need to be installed in order to compile the v4l package. Simply get the kernel sources with Yast. Unpack the v4l package, change to its directory and build the modules: make make install Check for the presence of a running ivtv_tveeprom module: lsmod | grep ivtv_tveeprom If it is present remove it from the kernel: modprobe -r ivtv_tveeprom Insert the appropriate v4l-dvl modules: modprobe tveeprom modprobe tuner modprobe em28xx If module insertion fails, check out dmesg to find out what goes wrong, e.g.: dmesg | grep em28 em28xx: module not supported by Novell, setting U taint flag. em28xx: disagrees about version of symbol tveeprom_hauppauge_analog em28xx: Unknown symbol tveeprom_hauppauge_analog The ...

Prisoner’s Dilemma applet

June 4, 2008 – 11:26 pm
Retrieved from the old wiki: The Prisoner's Dilemma source code has been released, a simple AWT based and multithreaded Java applet. /** The Prisoner's Dilemma @version 0.20 @author Serge Helfrich 03-Aug-2002 (0.01 11-Feb-1998) */ import java.awt.*; import java.awt.event.*; import java.applet.*; public class Pris00 extends Applet { double b = 1.85; double p = 0.1; int delay = 100; // increased for green thread support boolean paused; PrisCanv cv; PrisPan pn; public void init() { paused = false; Color bg = new Color(255,255,192); setBackground(Color.black); ...