NAVIGATION
Home
Gallery
Java
Linux
Web
Scripts And Utilities
Mobile And Sms
Misc
Contact
pixelWIKI
Nabaz Tag




<<
About

Newest gallery images


Nerd Score

*sigh*

NerdTests.com says I'm a Dorky Nerd King.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!
18/05/2009 13:41 | 0 Comment(s)

trolls

                 ''~``
                ( o o )
+----------.oooO--(_)--Oooo.----------+
|    Please Do Not Feed The Trolls    |
|            .oooO                    |
|            (   )   Oooo.            |
+-------------\ (----(   )------------+
               \_)    ) /
                     (_/
14/10/2008 12:22 | 0 Comment(s)

nabaztag - wifi rabbit

I've got a Nabaztag. It's a wifi-enabled rabbit, with rotating ears, flashing lights, and a speaker. It comes with a number of services available, so it can check your email, read RSS feeds, give you news updates etc...

Quite frankly, it's completely pointless, and the available services are a bit lame. The weather is really bad; only a few cities to choose from, and it's very brief - "sunny, 18C" sort of thing. So I've hacked together a quick python script to retrieve the weather from the BBC - Nab Py Weather. Before 5pm it reads todays weather, after it reads tomorrows weather.

I've also linked mine to SMS and VOIP. An inbound sms handler (thanks sms2email) passes the SMS on to the bunny, where it's read out. I've also done a rudimentary Asterisk AGI script which records a message, then sends it to the bunny for playback. The scripts are at Nab Asterisk. The SMS redirect script is so rudimentary it's not even worth putting up.

I'll post any more scripts as and when I do them.
28/09/2008 19:23 | 0 Comment(s)

Hiberate and Oracle random order

I needed to return some results from an Oracle database using a Hibernate query; something that Hibernate doesn't natively support.

You need to extend the org.hibernate.dialect.OracleDialect, and use the extended Dialect in the hibernate.cfg.xml (or persistence.xml):


1:
2:
3:
4:
5:
6:
public class OracleDialect extends org.hibernate.dialect.OracleDialect{
	public OracleDialect() {
		super();
		registerFunction( "rand", new SQLFunctionTemplate( Hibernate.DOUBLE, "dbms_random.value" ) );
	}
}


To enable the random ordering, add order by rand() to the end of your HQL. Job done.
23/09/2008 09:47 | 0 Comment(s)

O2 broadband - day one (two?)

So my DSL switched last night. Plugged in the O2 supplied Thomson router, and got a connection instantly. And it's currently over 11mb; I'm fairly sure it will slow down, though, as I am only on an 8mb package.

Had a few issues at first, because I couldn't figure out from the O2 custom firmware on the router how to change the box's IP address and disable DHCP, as I run a 10.x.x.x range instead of a 192.x.x.x, and a custom DHCP server. Got there in the end though.

So far, the only real problem is that they block outbound port 25 if you have a dynamic IP, except to their smtp server. I'm not paying £5 per month for a static. Fortunately, I run my own mail server on an external server, and it was a simple matter to make SMTP run on both ports 25 and 261. Tweak the exim config on my main server to relay via the external server, and Bob's your uncle.

As I'm not paying for a static IP, I've hacked together a simple script to hit this page, check the IP against the last IP stored and drop me an email if it changes. I'll put the script up at some point. If it starts changing a lot, I'll just transfer my domain to DynDNS.


1add daemon_smtp_ports = 25 : 26 to your exim.conf near the top, above the acl_xxx lines
26/06/2008 09:37 | 0 Comment(s)

O2 broadband

I'm swapping DSL supplier, and giving O2 broadband a try. I've been very happy* with eclipse, but I'm paying a premium for what is no longer a premium service. For £7.50 per month, O2 is looking very good. I'll update with thoughts once I get switched over, and I've tried it for a few weeks.


*apart from a small point, when my DSL slowed to ISDN speeds. Which turned out to be a knackered 10/100 switch on my side :p
19/06/2008 16:27 | 0 Comment(s)

back | next