Occasionally when working on a code base the application at hand requires a directory for the storage of log files, uploads etc. You often like to keep the directory itself in the repository but you don’t want any of its contents that have a temporary lifespan making their way into…
Read MoreRaspberryPi Car Computer 15,000km Later
Version 0.96 of S3 Video for WordPress Released
The latest version of my popular S3 Video plugin has been released to the WordPress plugin repository.
After many requests the 0.96 release now allows a user to set a “still” image as a title or splash page for their video. A number of bug fixes have also been fixed in the latest release, the two major ones being:
- Prefill handling of the “videos per page” setting on the plugin settings page.
- Videos no longer float above text they are embedded below within a page or post.
The bundled copy of Flowplayer with the plugin has also been updated to version 3.2.15.
Plugin background:
The S3 Video for WordPress plugin allows a user to upload video files to their Amazon S3 account via WordPress and embed the videos using Flowplayer or VideoJS directly into pages and posts. For personal and commercial videos this provides lost cost, pay as you go model for video hosting.
More information on the plugin can be found at either the plugin’s github page or the WordPress plugin repository.
Useful Keyboard Shortcuts For Aptana Studio
The last couple of years I have been using Aptana Studio exclusively as my IDE of choice, after deciding it offered the power of Eclipse in a more user friendly format. I find the standard Aptana theme very easy on the eyes when coding for long amounts of time. Unfortunately…
Read MoreExecuting PHP Code Server Side In .html Files
On a recent project we needed to provide a client our contribution to the site code base as static .html files. To make the development process easier though a number of the developers wanted to include some of the global page assets such as the header and footer using PHP…
Read MoreDebugging Mobile Web Pages With Opera Developer Tools
If experience has taught me anything its that debugging mobile pages can be a massive pain. Replicating page display issues without a device on hand can prove problematic, and something as simply as testing a number of URL’s can become very time consuming using a touch screen keyboard to enter…
Read MoreSydney AWS Price Comparison
Its no secret I love AWS, a great API combined with their flexible pay as you go model has made it my platform of choice for many projects including my popular “S3 Video” plugin for WordPress. So when they announced their new APAC Sydney “region” a couple of days back…
Read MoreMirroring a website with wget
Clueless clients and bad briefs can make a developers life very difficult at times so sometimes it comes in handy to be able to replicate a site in its entirety to review. Rsync could be used to mirror the files to a local location but it doesn’t really fit this…
Read MoreBad Day For Electronics
My new GERTBoard an extension board for the Raspberry Pi GPIO interface arrived after a long wait this week. I brushed off my soldering iron all ready to put it to together only to find it had some surface mount components that I would need some more tools than just…
Read MoreHTML5 Offline Storage
HTML5 introduces a pretty handy ability to cache remote resources locally for off-line use, meaning the resources are downloaded once. Then when the page is used again in the future the local (cached) copies of the file will be used instead of requesting the files from the server again.
Why would you want this? This functionality come is handy for developing sites that may need to be deployed in places with patchy Internet i.e remote satellite offices or most importantly HTML5 mobile applications.
How do I make this happen?
First up you need to make an .appcache file for your site telling the browser exactly what resources you would like to cache. In its simplest form a manifest file is just a standard text file with the .appcache extension. The first line of the manifest file contains the line “CACHE MANIFEST” and each new line afterward a filename and path for a resource to be cached is listed e.g
CACHE MANIFEST
/css/style.css
/js/scripts.js
Easy PHP File Extensions With PathInfo
The other day I was building some file handling functionality into a project I was working on when i came to thinking about the best way to retrieve the extension of a filename with PHP.
The first approach that came to mind was using explode statement to split the string at the full stop giving the extension of the file in the last array element. The second was using substr and strrchr in combination similar to below: