Tag Archives: web

Ubuntu, Node and Heroku

I recently started playing with Node.js, and while I can play locally just fine, I wanted to make sure I had a place to host once I had something worth hosting. Enter Heroku. Why? Because it’s free to host until you draw some real traffic, it has a really cool addon service and I knew other people using it so I could turn to them if I had problems.

In order to get your application on their service, you need to install their command line tool, which requires Ruby. No problem, just install it all with apt-get and you’re good to go, right? Short answer, yes. Long answer, No. You’ll be using an unsupported version (the version of ruby in the Ubuntu repos is aged), so while it might work now, it may not in the future. If you do like I did, you’ll also end up with 1.8 and 1.9 on your machine, and while that didn’t cause any problems, it seemed silly.

Poking around, I found this article which lays out how to use RVM to both install a newer version of Ruby as well as easily update it in the future. So, here’s the whole shebang:
Continue reading

Fallout 3 Terminal Hacker

I recently started playing the game Fallout 3 a little more and I came across a terminal I could actually attempt to hack. After a few failed attempts at it, I thought I would poke around on the Internet and see if anyone had any guides for hacking the things. Instead, I found this online terminal hacker, among others (this was the best one though). I thought, “man, that’s pretty slick, but I wish I has something that I could run locally in the event my Internet was down.” I poked around online a little and found a bunch of people claiming to be prepping downloadable, standalone versions, but nobody had yet delivered. Then I thought, “I bet I could write me own,” and that’s exactly what I did.

The rules for hacking the terminals are:

  • You get 4 tries, after which you can never try again
  • If you exit before the 4 tries are up, your available tries reset to 4, but so does the puzzle
  • For each word you pick, you will be told how many matching letters you got
  • That count is how many matching letters there are in the SAME position of the correct word

Originally, I was going to write it in Python. That way I could potentially execute it from anywhere I could install the Python interpreter and it would give me a reason to dive in to Python. Then I decided I wanted it done quick, and in an even more portable way; as a raw HTML page. So, I decided to write my version in Javascript, and here it is!

I used the one over at mediumexposure.com as a benchmark and honed mine down a bit (I didn’t catch that last rule when I was playing the game, which is why I could never figure the puzzles out). I will admit, mine isn’t as smart as his since it doesn’t take past guesses and matches into account, only the most recent guess and the remaining list of possible words. So, there’s a chance mine won’t guess correctly in the 4 attempts, but in the handful of tests I ran, I always managed to get it.

Now, I know what you might be thinking. “Hey, this is just another online file, how is this portable? How can I run it from my machine?!” Simple, save the html file to your computer and open it locally. All of the magic happens in the Javascript code (which I commented so you can follow along), which will run from your machine without the need for any extrernal processing or server. Go ahead, give it a spin and be sure let me know what you think in the comments. It’s a work in progress, so when I make it smarter, I’ll update the file and post again. Enjoy!

Building a Better CAPTCHA

CAPTCHAs can be good for stopping SPAM, but the last thing most of them are are usable. Don’t take my word for it, it’s a fact. One of the coolest ideas I ever saw was a HotOrNot mashup where you had to pick the three best looking ladies to prove you are a human. It was both usable and easy for a normal person, like my Grandparents, to use. That’s pretty unique and hard to come by, and that’s why I liked it.

One of the other easier CAPTCHAs I’ve used at work is a little dynamic images that asks you to do a little simple math. It’s an idea I saw on another site so I thought I would give it a try and it’s been extremely effective despite it’s ease of being broken. Surprisingly, it has completely stopped all SPAM coming through our contact form.

Another one I tried, much less effectively, is a colored word and a dropdown with a number of colors to choose from. It literally asks “What color is this text?” and offers a number of possibilities. This, however, was not effective for more than a week or so. The form still sees about one or two SPAM messages a day, which is especially strange because it’s a site that sees far less traffic. I think if I added more colors that weren’t even valid selections and changed the order it might be more effective, but I still need to find something better.

I’m thinking a system that would show three images and ask which one doesn’t belong could be usable, but it’s a little more difficult to implement; where do I get the images, how do I randomize the data, etc. I really like the HotOrNot CAPTCHA because the images always change and all of the images and data are crowdsourced, nothing for you to manage.

So, what can one do? Sadly, I don’t have an answer, but there is a lot of work being done on the topic. I think I need to just keep looking and mull this all over for a bit. We’ll see what I can find or come up with.