Install JRuby on Mac OS X

Same idea as the Groovy and Grails posting, most of the steps are the same but here they are. Download JRuby from http://www.jruby.org/, as of writing this the latest release is 1.6.0. I’m downloading the tar file, I believe it the same as the zip file just different format used to compress the files. $ cd Downloads $ tar -xzf jruby-bin-1.6.0.tar.gz Now lets move it to our /usr/share folder and make the needed symbolic link.
Read more →

Setting up a remote Git repository

I been trying to use Git more and more to help me learn it. My first step was using it for the pre on this blog but I have also been using it on some small projects I been work on for myself. Git works just fine locally and still is able to use all the features it has but to really take advantage of Git you need to setup a remote repository and here is how to do it.
Read more →

Install Groovy and Grails on Mac OS X

Just some steps to get people up and running with Groovy/Grails on Mac OS. Hopefully with this steps you will be able to easily upgrade to any new version that comes out. Keep in mind you will need to replace the version number that is part of the file names as they upgrade. Download the newest releases of Groovy and Grails, Groovy can be found at http://groovy.codehaus.org/, and as I’m writing this the Stable Release is 1.
Read more →

Twitter and Geolocation with Ruby

It goes without saying that there is TONS of data on Twitter, luckily there is a nice API to be able to read some of that data. There are a good number of apps annd sites that are using this data and making some great services that help with analyzing, sorting, and parsing content from other social networks. So I wanted to take a quick look at what it takes to read some data from the Twitter API from Ruby and write a little fun code that also does some Geolocation based on your friends location they enter on Twitter.
Read more →

HTML Parsing with Groovy

In a perfect world all the websites we would go to would be well formatted to the point that we could call them XHML so we could parse the data just like any other XML file but sadly this is not true. There is a lot of errors on pages that your browser fixes in the background or just simply overlooks due to HTML being so lose in its formatting structure.
Read more →

Making screenshots of websites with Groovy

For a project I needed to work out a way to make thumbnails/screenshots of HTML files for some Java code I was working on. From my research, I found a nice project called the The Flying Saucer Project which has an XML/XHTML/CSS 2.1 renderer which works for what I needed for my project. Taking the HTML files and using JTidy to make them in to XHTML the renderer could output an image file for me.
Read more →

Ruby, HTTP Post and Lyris ListManager

A bit ago at work I was asked to help a customer with a solution for using the Lyris ListManager’s SOAP API with just HTTP Post calls. They just needed to see some sample code that they could use to re-write. SOAP is XML based, you send and get back XML. Just using HTTP Post you need to format the XML you are sending and then parse out the information you get back from the SOAP server.
Read more →

Stopping SSH Brute Force attacks on Linux

From my other posting “Stopping SSH Brute Force attacks with PF on FreeBSD” I’ve been getting a good number of hits from people searching on how to stop SSH Brute Force attacks but on Linux and not FreeBSD, so I kind of feel the need to make a posting on this for the linux people. I also just setup a Fedora 13 server on Rackspace’s Cloud and I wanted to ensure I could stop SSH Brute Force attacks.
Read more →

Python code for dealing with ZFS snapshots

From my last posting about ZFS “Fun with ZFS send and receive” we see that the ZFS commands are really easy to use but very powerful, because of this I find it easy to write scripts to do the things I need. Here is some code that I use for snapshots, it’s written in python but can be ported to anything as it’s taking command line output and parsing info for what it needs.
Read more →

Entitize Strings with Groovy

Not sure if ’entitize’ is the right term but it’s what people at my old job would call the process of taking high level characters and replacing them with the unicode. For example, € would be replaced with €. This was needed with some inhouse applications or dealing with output to HTML/XML to ensure it would show the right character to the users. Well, I needed to do this awhile ago and I looked up some old Python code that I had done before and re-wrote it in Groovy.
Read more →