Wednesday, June 15, 2011

Your own free corner of the intraweb

Every now and then you receive an email from a really cool domain (the part after the @), and might wonder how you could get your own. Lots of technical knowledge required, right? High costs and service providers throwing jargon at you, right? Wrong. It's easy, and here's how:

Registering your own domain for email / a web-site has 3 components:
  1. The domain name - mine is "cave.za.net"
  2. The nameservers - in order for people and emails to know how / where to find you (without getting too technical), a registry of servers is needed. It's sort of like the equivalent of an address book for your domain.
  3. The service provider - someone to give you the space where your email gets delivered to or where you can stick a web page.
Ok - a little jargonish. But here's the practical way of setting it up for free:
  1. Find a domain name. http://www.za.net offers free (no catches) domain registrations, so head on there, click on "whois" and type yourname.za.net to make sure its available. www.za.net only offers domains ending in "za.net" and "za.org", so you are limited to these. No .com's, sorry. Once you have found your dream domain, you'll need to set up nameservers before registering.
  2. Nameservers - the address books of the internet. http://www.everydns.net offers free DNS hosting. Create an account. Add new domain (basic).
  3. Ok, back to step one. Now that the nameservers are configured, go to the registration form at http://www.za.net/register.html, fill in the domain name and your information. It's probably a good idea to not publish your home address as this information is published publically. The technical part requires 3 name servers. When using everydns.net, nameservers should be set to ns1.everydns.net, ns2.everydns.net and ns3.everydns.net. This info is given to you when you click on your domain name that was created above in the everydns.net control panel.  The IP's can stay blank, za.net will figure them out for you. The actual registration might take a few weeks (I've waited up to 4), but its free, and this is the only waiting period you should have.
  4. Lastly, service provider. There's this awesome company called Google that provides free domain mail and web hosting, so mosey on over to http://www.google.com/a, click on Solutions -> Google Apps (Free) and hit the "Get Started" button. Or just click https://www.google.com/a/cpanel/domain/new to get you right there. The setup of the hosting is probably the most complicated part, but Google gives you all the instructions you need. It will ask you to set up some settings with your domain, which can be done via the everydns.net control panel - adding a txt record, updating the A records (for the website) and setting MX records (for email delivery). Then create accounts (to receive email on) and maybe configure a site.
Welcome to your first semi-privately owned space on the net. It might not be a https://www.jemstep.com, but it's yours. Have fun.

Thursday, April 14, 2011

Gradle: execute a task and write output to a file

i searched for a while to get this working as expected. The solution is really simple and straightforward.

task writeOutputToFile << { new FileOutputStream(new File("$outdir/$outfile")).withStream { os ->
def res = exec {
executable = "/bin/echo"
args = ["param1","param2"]
standardOutput = os
}
}
}

I was initially using Process to write, but groovy has a bug where the main process exits when it finishes, causing the thread to exit before it finishes writing (using a FileWriter).

Friday, January 21, 2011

expressive error message

Don't often find strange / funny error messages that often, just came across this one in a new testing framework...

I'm pretty sure this one won't stay as-is for long.

Error Message
org.jboss.arquillian.spi.LifecycleException: Bad shit happened