This is a basic ‘check in like’ tutorial that saves the current latitude and longitude, along with a timestamp. This can be achieved through using Geolocation, Ajax and PHP.
I’m using Twitter’s Bootstrap theme, so for it to look fancy, include the Bootstrap theme’s files on your check in page below.
The first step is to locate the user through the Geolocation function. This finds the user’s latitude and longitude and uploads it to a table in the database.
If you use Terminal quite a bit, like me, the default theme isn’t the best design Apple. Scouting the internet, this theme came up – Peppermint Terminal Theme 2.1:
Peppermint Terminal theme screenshot
rm -rf “DirectoryName”
This will delete the entire directory without prompting you to delete its subdirectories, in Linux (without quotations).
On a little project I’m working on, I needed to LEFT OUTER JOIN table ‘a’ with table ‘b’ – “Show the user all the societies they have not yet joined.”, but I had two predicates to work with, a user ID.
My table ‘a’, has a list of societies a user can join, within table ‘b’, the user’s chosen societies are stored, with the foreign key being the ID of the society. With each user being unique, my query had to take this into account. Continue reading
My username/email availability checker is an improvement to this one (why reinvent the wheel?). There were a few syntax errors and the MySQL connection wasn’t as secure as a PDO one. So, if you have a form that requires an email/username check, this will do just that. Continue reading
As there seems to be an error with my MAMP running on the default Apache port (80), I switched to the MAMP Apache/MYSQL default ports (8888/8889). Once I swapped the configuration over, my CakePHP application could no longer connect to the database.
After a bit of messing around/tweaking, I finally got it to work. Here is the recommended CakePHP 2.x Database.php code: Continue reading
I know there’s plenty of other sites that offer this information, but another one won’t harm.
So, how to Show/Hide your hidden files on your Apple operating system. Continue reading
Recently, I’ve developed a spreadsheet to help track/organise a few projects I’ve got on the go, along side using GitHub.
I’ve wanted a function that if a cell denotes “Yes”, another cell calculates 3 days from today, excluding weekends.
As my spreadsheet is used by a few people, I didn’t want to install any add ons as it would then become dependent on that.
The easiest formula I believe to use is: Continue reading