Archive for the ‘code’ Category

Dice Roller

Sunday, April 1st, 2012

So I wanted to mess about with the Google+ api for Hangouts. I wrote a little dice rolling app  perfect for those D&D games people play using Google+ Hangout!

That’s what everybody is using Google+ Hangout for, right?

Right now it’s stilll a little convoluted to make it work. When the Hangout loads you’ll get a screen asking permission for the app to run. Then it’ll most likely reload the Hangout. Then you’ll get a little drop down message by the address bar asking for permission again due to ‘insecure content’ (that’d be the images). Once you agree to all that then… possibly another reload of the screen… then click on the Apps button and then Recent  tab within the Google+ Hangout to see and use said custom app.

A bit of a pain in the ass to get there, but they’re still working out the kinks.

Full Circle

Sunday, March 4th, 2012

And here I am almost three years later to the day going back to relearn GWT.

Uncanny.

HTML 5 Doctype and JavaScript having a tiff?

Friday, February 5th, 2010

So I was messing about with JavaScript today in an HTML 5 file. Everything was going along swimmingly and interactiveness of said web page was cranking along fine. Until…

Certain bits I was adding wouldn’t work. Specifically something like:

document.getElementById(“chooseAnImageName”).style.height = 400;

Once I remove the doctype declaration, “<!DOCTYPE html>”  from the file everything worked fine. Not sure why this is happening or what other bits of JavaScript will also conflict within an HTML 5 page. The Googles have produced nothing.

Guess I’m going to find out on my own.

How you get phished

Friday, February 5th, 2010

Social networks (ie Facebook, MySpace, etc) are really a horrible vector by which to get royally screwed.

All it takes is for one person in your friends list to get hacked – and that hacked account to send you a link.

I mean, really, are you NOT going to click that link? Do you event think about what people send you?

I use Steam for my gaming and game management on my PC. It has a built in social network feature. You can join groups, add friends, and send chats. Someone’s account in one of those groups got hacked. They are sending out chat messages with a supposedly funny link. To the untrained eye it looks legit – but hey, this is part of what I do for a living so I knew something was up as soon as that linked flashed in the text box.

The user has been subsequently reported and a screen shot tossed up on all the gaming forums I know of to hopefully warn others off.

That’s how it happens. That’s how you end up entering your log-in info into a website that looks remarkably legit. Maybe you think you are logging into your Facebook, MySpace or Steam account. All you are really doing is sending your login and password directly to a bad guy. Moreover, if you are like most people, your login and password are the same across the web, for your bank, for your gmail, for your computer. Once that bad guy has your information, it’s a short hop to try it out at popular websites. Then you are really compromised.

Welcome to the wonderful world wide web. Be on your guard or you will get screwed.

NEVER open up a suspicious link in a regular web browser. I use Sandboxee which locks things down and keeps malicious code from running amok.

HTML 5 makes creating web pages fun (again)

Friday, January 22nd, 2010

The early 1990′s were exciting times for the web. Everything was new, exciting discoveries were just around the next click on the web ring, and making web pages was fun. HTML made coding easy because the language was simple. You could churn out a page complete with blinking text in no time. Awesome stuff, especially for people that weren’t quite as enamoured of Basic or C.

Once the Netscape and Microsoft browser wars really got into full swing things got complicated quickly with custom tags littering the battlefield. Then came really complicated bits like JavaScript, Flash, Java, and the list goes on.

Along the way HTML got butchered. The simple language for sharing documents and images became a stepping stone for bloated, ugly code and browser incompatibilities.

It’s been a long winding road for the World Wide Web Consortium (WC3). They are the standards organization that tries to look after things like HTML. Since just before 2000, they’ve been trying to rein things back in and bring the additional power that JavaScript, Flash, and other add-ons brought to the web back to a single standards based format. With HTML 5 it feels like things are very back on track.

The simplification of Doc Types and the addition of tags like <audio> and <video> that make embedding music and movies a snap is one short example. I was able to whip out a quick page with both mp3 files and home movies in minutes – moreover it worked seamlessly – without Flash, without Javascript or anything thing else to muck up the works or add unnecessary lines of code.

Easy, just like it used to be.

Want to try it for yourself? Check out this link on embedding some video.

It’s no wonder Google and Apple are on top of this and making sure their browsers are HTML 5 compliant. Lower processing overheads, faster load times and a richer browsing experience are their money-makers. All this also makes sense why Apple never pushed Flash onto the iPhone (though, perhaps, they were ahead a few too many steps).

I, for one, welcome our HTML 5 overlords!

Today’s pinnacle of nerdiness

Friday, January 15th, 2010

So pleased with myself.

RedHat in Sun's Virtual Box.

Ruby – invalid gem format

Wednesday, December 9th, 2009

For days I was banging my head against a firewall issue for a client. I had to set-up a Ruby on Rails environment plus a few other needed gems.

Everytime I tried the: gem install it would run through the motions, download a copy to the cache and then error out with the ‘invalid gem format’ message.

A number of Google searches only turned up the following, “delete the gem in the cache folder and try again. Fat lot of help that was.

Eventually through trial and error I found that if I manually downloaded each gem, moved to the directory of the downloaded gem and did a: gem install –local , it would finally work.

The error message I kept getting was worse than useless, it kept pointing me in the wrong direction.

This was a pain in the ass, especially when setting up Rails where you have multiple gems that have to be installed in a certain order AND you are brand new to it all. Worse, I never found one site within Google’s vast search domain that had a similar problem. So, no help from the crowd.

Hopefully this post will save someone else some headache down the line.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes