Entries Tagged 'How To' ↓

Making Moblock actually useful for everyday use

Moblock is a fantastic alternative to PeerGuardian for Linux systems. Running some form of blocking software is important to protect your privacy when using P2P applications like BitTorrent and Gnutella; if you’re not using anything, you should be.

Unfortunately, in it’s default configuration the filtering can be a little aggressive. There is nothing whitelisted (explictly allowed), so any IP address caught in the filter is blocked. This list of filtered IP address ranges includes addresses belonging to Microsoft and Google, meaning that all traffic to those companies is blocked - including HTTP traffic and instant messaging.

To enable both MSN and Google Talk, find the following line in the file /etc/moblock/moblock.conf:

#WHITE_TCP_OUT="http https"

Now, remove the ‘#’ from the start and add the ports as follows:

WHITE_TCP_OUT="http https 1863 5222"

Presto!

The numbers 1863 and 5222 are the port numbers for the MSN protocol and XMPP protocol that Google Talk uses. If you have another application that is being blocked by Moblock, you should be able to find what port it uses here.

For installation instructions on Ubuntu, check out this Ubuntu Forums thread.

Access WebSphere Variables in J2EE Applications

Accessing WebSphere Variables from inside your J2EE application isn’t as easy as it looks. They’re not environment variables or system properties, but a portion of the WebSphere configuration that is used by the WebSphere Application Server Runtime.

You can access these variables by invoking an operation on “AdminOperations” MBean as follows:


    	try
    	{
    		AdminService adminService = AdminServiceFactory.getAdminService();
    		ObjectName queryName = new ObjectName( "WebSphere:*,type=AdminOperations" );
    		Set objs = adminService.queryNames( queryName, null );
    		if ( !objs.isEmpty() )
    		{
    			ObjectName thisObj = (ObjectName)objs.iterator().next();
    			String opName = "expandVariable";
    			String signature[] = { “java.lang.String” };
    			String params[] = { “${VARIABLE_NAME}” } ;
    			Object retVal = adminService.invoke( thisObj, opName, params, signature );
    			System.out.println( retVal );
    		}
    	} catch (MalformedObjectNameException e) {
		e.printStackTrace();
	} catch (InstanceNotFoundException e) {
		e.printStackTrace();
	} catch (MBeanException e) {
		e.printStackTrace();
	} catch (ReflectionException e) {
		e.printStackTrace();
	}

This code will only work from an application running inside the server.

How To Rip a DVD

Amon was asking me how to rip DVD’s a couple of weeks ago, so why not share with the rest of you the link I gave him:

How to rip a DVD: A Tutorial by Elliott Back

I’ve been using this method for ripping DVD’s for a couple of months now with no hassles.