Tracking AT&T Data Plan Use With PhantomJS / Part 1

Tracking AT&T Data Plan Use With PhantomJS / Part 1

When my family moved to the cheaper AT&T Shared Data Plan we saved hundreds of dollars every year. But, now we had to better manage the data use because it was shared by 4 people. Most months we don’t have a problem but I would like to know when we are over budget early enough to tell everyone to conserve. No Problem, I thought. I will use my Raspberry Pi to scrape the AT&T web pages and send me an alert when the use is too high. I already use my RPi to gather information like the outside temperature and stock quotes and this shouldn’t be any different. I was wrong. The AT&T site makes heavy use of javascript and jQuery and I was not able to the simple methods I used in the past. That is where PhantomJS comes into the picture. (more…)

How To Compile PhantomJS on the Raspberry Pi 2

How To Compile PhantomJS on the Raspberry Pi 2

PhantomJS is an awesome tool for web testing, web scraping and complex scripting. In a future post I will be talking about how to use PhantomJS to check and report on cell plan use. Because the Raspberry Pi 2 is new, no one has created a PhantomJS repository entry so before I could use it on my Raspberry Pi 2 I had to compile it from scratch. The PhantomJS team has done a super job automating most of the process (check out the instructions here) but a few tweaks are needed for the RPi2. (more…)

Adding swap to the Raspberry Pi

Adding swap to the Raspberry Pi

Recently I was working on a project that required more RAM than my Raspberry Pi has. After all, the model B only shipped with 512MB and part of that needs to be allocated to the video card. But Linux has a method of dealing with running out of memory called the swap. The swap is a file on disk that serves as ‘overflow’ RAM space. It is slower than regular RAM but is a better solution than simply having the program crash. At the time I was using Arch Linux which doesn’t setup any swap by default. Raspbian does setup swap space but doesn’t do it in a recommended manner. (more…)