Posts

Double Bluff HoneyPot

Image
Trying to avoid form CAPTCHAs, so considering implementation of a "Double Bluff" honeypot to stop spam. Goes like this: CSS hidden, traditional honeypot input with a tempting name like 'title' that's empty for robots to inadvertently fill. Then a hidden input that is javascript filled once page has loaded. Checking the first pot is empty and the second full should capture all but the mightest spam routine...

Installing LAMP Apache/MySQL/PHP on Chromebook/Chromebox

Google Chromebook / Chromeboxes make excellent mini web-servers for development/testing/office use, or for using in kiosks / taking to tradeshows etc. Amazingly there is enough space on them for a reasonable sized web-site and database, and the oomph is comparable to a medium-size virtual server from one of the popular web-hosts. Firstly, get your Chromebox / Chromebook running Linux by installing Chrubuntu: Follow this guide here ->  http://webonaut.blogspot.co.uk/2012/11/installing-ubuntu-linux-on-your.html Bring up a Terminal. (Remember, your user is called "user" with password "user" by default). Type: sudo apt-get install tasksel sudo  tasksel Use the cursors to select "LAMP" (dom't deselect the default options or you may take away your desktop!) then hit return. (BTW: Now is a good time to try Edubuntu as it is cool, and openssh-server is useful too ;) Give the mysql root user a password when prompted. Test it out! Try this ...

Installing Ubuntu Linux on your ChromeBox/ChromeBook

NOTE: THIS WILL WIPE YOUR BOX! (but you only store stuff in the cloud, right?) Switch the developer switch on your machine (it's in a little hole on the back of the Chromebox. Use a paper clip and BE CAREFUL - it's not a strong switch) Switch the machine on. The unhappy face means you are in developer mode (sweet!). You can wait (and put up with the loud double-beep) or press Ctrl+D to continue Log into ChromeOS as normal Open a browser window and press Ctrl+Alt+T to bring up the mildly rubbish in-browser crosh terminal type "shell" to get a decent bash shell type "sudo bash" to get an even better root shell! type " chromeos-firmwareupdate --mode=todev " to update and properly enter developer mode Note: switch back later by typing the reverse into an Ubuntu shell, e.g. " chromeos-firmwareupdate --mode=normal " type "reboot" and follow steps 4,5 and 6 again The next steps are a bit convoluted, but here's a handy ...

Disabling HTML5 Video Right-click Download

So, for the Arena Hotel project I've just completed I needed to prevent the default HTML right-click context menu that allows download of videos. There is no tag parameter for this, so the only way you can do it is by disabling context menus either on the container div, or the whole document. Wedge this code in: $(document).ready(function(){   // Kill the right-click context menu globally   document.oncontextmenu = function() { return false; }   // or just kill for a particular container div   $('#mydiv').bind('contextmenu',function() { return false; }); });

Mountain Lion MySQL Death Bug

Like a bad tech cold, the Mountain Lion MySQL death bug has finally (inevitably?) reached me having already taken out several developer friend's systems. This can result in you losing ALL of your data, so backup your data directory FIRST - probably it'll be in /usr/local/mysql/data so: sudo bash cp -R /usr/local/mysql/data ~/backups/ Next, kill off your duff my.cnf file: my /etc/mysql.cnf /etc/mysql.cnf.old ... and restart: mysqld --verbose

Not getting PHP errors following Mountain Lion Upgrade? What to do...

After upgrading to Mountain Lion I found that my php.ini (usually in /etc/php.ini) had been nuked meaning that no errors were being displayed in my development LAMP environment :( Actually, it seems that Apple simply rename your existing php.ini file to php.ini-5.2-previous (or similar) so that you jump back to the default PHP settings. Rectifying this is fairly straightforward however - simply: 1. Open Terminal 2. Log in as root by typing  sudo bash 3. Type: cd /etc cp php.ini-5.2-previous php.ini 4. Restart apache with:   apachectl graceful And you're good to go...

Free Early Years software for 2012

Really proud to announce that our increasingly popular school pupil tracking software Pupil*Asset  is going to be offering support for the new Early Years EYFS foundation stage profile for FREE (so long as someone at the school gets training to keep our support guys from going crazy...) If you are interested in tracking the revised FSP (from Sept 2012 for ac.year 12/13) you can register your interest here . There are only a limited number of training places (and hence systems) so get in there!