Ubuntu “Cheap Trick” Denial of Service

Here’s a little something I learned the hard way today – you can’t login into Ubuntu (and presumably other Linux distros) via GDM without a correctly configured /tmp/ directory.  Thus running something along the lines of:

rm -rf /tmp/

will prevent anyone from logging in through GDM after a reboot. I might use this little trick in my upcoming Case Studies live fire exercise this Wednesday, but I will explain more about that in later posts.

The solution is quite simple really; first reboot your box into recovery mode and then drop into a root shell.  Now run the following commands and all will be well:

rm -r /tmp/
mkdir /tmp/
chmod 1777 /tmp/
shutdown -r now

Read the rest of this entry »

Filed under: Operating Systems

My Experience with Google Maps API

A few weeks ago, I was tasked with improving the Google Maps feature for a major project at my internship.  The map was part of a location-based search feature that is used on several different parts of the project. Essentially, a user enters a zip code and some other search parameters and a list of locations is generated and mapped out for them. While I am an experienced JavaScript programmer, and am familiar with a lot of related libraries and APIs, the Google Maps API is one that I had yet to introduce myself to.  So when presented with this task, I jumped at the opportunity and began to read up on various API documentation that Google provides.

As expected, the features and functionality provided to individual developers by the API is impressive.  One can achieve virtually all of the functions that Google’s own mapping service provides and then some.  Since the project I was working on called for a fairly simple mapping system (the basic markers and info window we’re all accustomed too), I didn’t really get a chance to learn all of the nifty features provided by the API.  Once I get some much needed free time over winter break, I am sure I will learn more about the API and possibly throw together a simple web application showcasing what I have learned.

In developing the mapping feature for this project, it became clear that I needed some sort of library to help manage the various pieces of data and events.  I decided to create a Singleton Class that uses jQuery to help manage the map overall.  My code uses the Module Pattern as described by Douglas Crockford.  While the name, Module Pattern, may seem misleading (I think ‘Singleton Pattern’ does it better justice), the Module Pattern is a rather useful JavaScript design pattern that eliminates the need for global variables and enables some key Object Oriented Design concepts (private variables and methods anyone?).  I decided to dub this simple class IMapper.

Read the rest of this entry »

Filed under: Web Development

Happy Thanksgiving!

Happy Thanksgiving to whomever may read this. Enjoy the holiday and of course, the turkey!

I promise within the next few days I will start to post more on my blog. I have just been so busy with term projects and my internship, it’s difficult to find a free moment.  So stay tuned everyone…

Filed under: General Banter

Welcome to MJCBlog.net!

Well after much delay I finally finished up my layout and theme.  It is partially based on the Elegance theme designed by ‘PowerTheme’.  So a lot of credit belongs to PowerTheme.  By no means did I take any shortcuts though, my theme is designed from scratch, just some of the images and styles are from the Elegance theme.

All in all, I am extremely happy with how everything came out.  I hope my readers (do I have any yet?) enjoy my blog and all my rants.  Check back frequently because I do have a lot to say!

Filed under: General Banter
© MJCBlog.net - All Rights Reserved
Powered by WordPress