Posts

Take EXTRA PRECAUTIONS when using public WIFI

Image
This is me hacking my own account to show how easy it is to hack a facebook account with the right tools and a little know-how. I blurred out the tool I used for my adventurous friends out there since this is not a tutorial on how to hack. This is a warning to those public wifi users and friends. All I need is a laptop and fire up the command to create a fake WIFI connection. This command will create a WIFI connection and will be visible to all nearby devices. Let's check my cellphone. Yup! It's there let's choose "SM FREE WIFI" and see what happens. On my laptop, it shows that someone just got connected. On my cellphone, it requires us to sign-in. This page actually came from our fake wifi (laptop). It looks legit and if you're not careful say goodbye to your facebook account. Below are the results when i tried to login. Lesson: Never give up your login details for a free connection.

Organizing Javascript codes with namespacing

Image
Usually when I build website each page has it's own Javascript file. But as the site grows I find it hard to maintain and code duplication is every where. After a few googling and research I found out that Javacript namespacing is the best way to organize and modularize your code. With my current hybrid app I have to constantly communicate with SQLite and that's how I realize I have to reuse code blocks to avoid spaghetti code. What I did is something like this. Let's break it down into pieces. Line one - we create a closure and import jQuery object so we can use it inside our namespace. You can remove the dollar sign ($) if you don't need it. Make sure you remove 'jQuery' at line 25 too. Line two - we declare a global object variable 'APP'. This is our namespace. Line four - we put a sub-namespace called SQL. Basically this a namespace inside a namespace. cool isn't. Line 5 - we declare a function named 'insert' with parameter ...