John Cox

Blogs · @wyome · Now · Shelf

Interesting

timeago: a jQuery plugin

Project page for Timeago, Ryan McGeary's jQuery plugin that turns ISO 8601 timestamps in HTML5 `<time>` tags (or legacy `abbr` elements) into auto-updating fuzzy text like "4 minutes ago". The case made for it is that timestamps are computed client-side, so pages stay fully cacheable and never show stale relative times, with time zones handled as long as the timestamp includes a zone designator. It also covers setup, programmatic use, settings for future and past dates, locale support, and a sample Rails helper, and notes its debt to John Resig's earlier approach and Rails' `distance_of_time_in_words`.

Permalink

The id attribute got more classy in HTML5 · Mathias Bynens

HTML5 drops the HTML 4.01 restrictions that forced id values to start with a letter and use only letters, digits, hyphens, underscores, colons and periods. Now an id just has to be unique, non-empty, and free of spaces, which makes its rules nearly identical to those for class values. The piece shows that oddball strings like "♥", "##", "{}" or even a brainfuck program, already valid as class names in 4.01, now work as ids too, and notes that targeting them in CSS (and in JavaScript selectors) requires escaping special characters, which it covers in a companion post.

Permalink

Checking your code with PHP Code Sniffer in PhpStorm 4.0 | WebStorm & PhpStorm Blog

This is a JetBrains feature note explaining that PhpStorm 4.0 can run PHP Code Sniffer (phpcs) automatically as an inspection, re-checking a PHP file every time you edit it. It covers the prerequisite of having phpcs installed and working from the command line (confirmed with `phpcs --version`), then how to enable the validation inspection in settings. Results appear in the editor prefixed with "phpcs" to separate them from PhpStorm's own warnings, and on large files they may take a few seconds to show up without blocking editing.

Permalink

phpminiadmin - extremely lightweight alternative to heavy phpMyAdmin

phpMiniAdmin is pitched as a single-file replacement for phpMyAdmin: you upload a roughly 30KB PHP script instead of an 11MB install, open it in a browser, log in with your database credentials, and get an SQL console. It also lets you browse and manage tables, import and export .sql and CSV, check server status and permissions, and run CRUD operations. The page leans on speed and low server load as selling points and backs them with user testimonials, including a freelancer who valued it for working with MySQL across hosting panels that make database access awkward. Worth keeping as a quick option for getting into a MySQL database on shared or unfamiliar hosting without setting up the full tool.

Permalink

Laravel - A Clean & Classy PHP Framework

The saved text is a testimonial strip from Laravel's marketing page, not an article with an argument or reporting. It collects short endorsements from developers and founders, including Adam Wathan of Tailwind, Aaron Francis, Jack Ellis of Fathom Analytics, and Erika Heidi of Minicli, who praise the PHP framework's developer experience, speed of shipping, scalability, and community. The common thread is longevity and loyalty, with several speakers citing roughly a decade of use. It offers no technical detail or comparison, so it is worth keeping only as a snapshot of how Laravel presents its social proof.

Permalink

Auto PHP Codeigniter CRUD | grocery CRUD

This is the feature page for Grocery CRUD, a PHP library that generates full create-read-update-delete interfaces on top of the CodeIgniter framework. It pitches the library as simple enough that clients need almost no documentation, and as customizable through callbacks for columns, fields, and operations. The other selling points are support for one-to-many and many-to-many relations out of the box, translations in 34 languages, cross-browser support, an active forum community, thorough API docs, and open-source code. It's marketing copy rather than a technical comparison, so it's useful mainly as a pointer to a CodeIgniter admin-panel tool.

Permalink

paulirish/jquery-ajax-localstorage-cache · GitHub

Jalc (jquery-ajax-localstorage-cache) is a jQuery plugin that caches AJAX responses in localStorage, or any object implementing the Storage interface, to save bandwidth and time. It adds options to `$.ajax` for turning caching on, setting a per-key TTL (default 5 hours), customizing the cache key, validating the cache or the response, and, in 2.x versions, transforming data before it's stored. The 1.x line covers jQuery 1.5.1 up to 3.0.0 and gets only bug fixes, while 2.x targets jQuery 3.0.0+. Sibling projects handle binary data (Jalic) and the Fetch API (fetchCache). Worth remembering are the caveats: `thenResponse` runs only on remote fetches, not cache hits, and explicitly setting `dataType` gives more consistent results than relying on jQuery's guess.

Permalink

Internet Explorer for Mac the Easy Way: Run IE 7, IE8, & IE9 Free in a Virtual Machine

A walkthrough for running Internet Explorer 7 through 11 on a Mac for free, by using VirtualBox together with Microsoft's free IE testing VMs. The ievms shell script, run from Terminal with a curl one-liner, downloads and converts the images automatically (about 11GB each, 48GB for all). It also covers the default "Password1" admin login, a fix for the changed GitHub raw URL, and the trick of reverting to the original VirtualBox snapshot to get around Microsoft's 30-day expiration. IE6 is handled separately through a less reliable Wine-based method, and the piece notes that the main use cases are web development testing and sites that demand IE.

Permalink

hoverIntent jQuery Plug-in

hoverIntent is a jQuery plug-in that refines the built-in hover method by watching how fast the cursor is moving and only firing the handlerIn callback once the mouse slows down, which signals the user actually means to rest on the target. The goal is to stop animations or ajax calls from triggering accidentally as the pointer sweeps across the page. It addresses the weakness of plain timeouts, which work for small hover areas but can misfire on large ones regardless of what the user intends.

Permalink

Image CRUD for Codeigniter | WEB and DEVELOPMENT;

Image CRUD is a CodeIgniter library for handling multiple image uploads, built in the same spirit as Grocery CRUD, where a few lines of code give you the full set of functionality. It lets users select several photos at once, auto-crops thumbnails and resizes large images to a max of 800x600, and supports reordering and deleting after upload, along with automatic renaming of filenames with special characters. It can also tie images to a related record by picking up the ID from the URL; the post links to version 0.5 for download, the official site, and the GitHub repo.

Permalink

jquery.qrcode - jquery plugin for pure browser qrcode generation on Jerome Etienne blog

This is a 2011 announcement of jquery.qrcode.js, a jQuery plugin that generates QR codes entirely in the browser. It is standalone, under 4k minified and gzipped, and needs no image downloads or external services, so there is no added latency and no dependence on a third party that might go offline. It wraps an existing multi-language QR code library, and usage takes three steps: include the script, add an empty container div, and call `.qrcode("text")` on it. The code is MIT-licensed on GitHub, and readers are invited to file issues or fork it.

Permalink