Tag Archives: github

Mijn m.deredactie.be-alternatief nu ook met Sporza

futttas-sporzaHet was exact een jaar geleden dat ik nog iets over mijn m.deredactie.be-alternatief schreef en het was nog langer geleden dat ik er aan gesleuteld had. Omdat ik tussen mijn echte werk en mijn WordPress plugin spielereien nog wat tijd had, heb ik één en ander verbeterd;

  1. Je kunt nu ook Sporza-nieuws lezen
  2. Op PHP-installaties zonder APC-support (apc_store/ apc_fetch) wordt de cache nu op disk bijgehouden
  3. Op PHP-installaties zonder CURL-support wordt nu teruggevallen op file_get_contents
  4. Een reeks kleinere UI-verbeteringen en fixes voor PHP-notices
  5. Getest op PHP 5.2, 5.5, 7.0 en HHVM (op openshift)

De (crappy) sourcecode staat nog steeds op GitHub, bug-meldingen of pull-requests zijn daar zeer welkom :-)

Bringing Autoptimize 2.0 (beta) to a Christmas-tree near you

While over the last couple of months Autoptimize was quietly picking up users to reach 100.000 active installations, work was ongoing on the next version, the magical 2.0 (the PowerUps mentioned here before are still on the roadmap, albeit with some delay as I want AO 2.0 out first). Yesterday I uploaded what I consider to be the first Beta of Autoptimize 2.0 to the wordpress.org plugin repository and before inviting you to download & test this release I think this is the ideal moment to document some of the changes in that new version. Here goes;

  • Option to (de-)activate aggregation of inline JS and CSS which would allow to fix or prevent some of the recurring problems people have with AO (I’ll post a follow-up post on this with more info soon).
  • Option to remove Google Fonts (special request from my favorite user who obviously doesn’t like (Google) Fonts and who is too lazy to just dequeue them).
  • On average 30% faster minification (I’ll spill the beans on how that was done and what this implies in a later blogpost)!
  • Cache-size will be checked daily and a notice will be shown on your wp-admin pages if cache size goes over 512 MB (threshold can be changed using a filter).
  • Small autoptimized CSS (e.g. some print CSS) will be inlined instead of linked (256 characters by default, can be changed using a filter).
  • New in API: filters to declare a JS and CSS whitelist, where only files in that whitelist are autoptimized and all others are left untouched.
  • New in API: filters to declare “removable” CSS and JS, upon which Autoptimize will simply delete that code (emoji’s for example, if you prefer not to dequeue them).
  • lots of small and bigger bugfixes, I won’t bother you with a full list but have a look at the commmit log on GitHub.

I consider the code for this version feature-complete (have to keep some things up my sleeve for later versions), but what is needed now is testing, bug-reporting, bug-fixing and more testing. And translations, if you’re into those (I already contacted some earlier contributors). You can download Autoptimize 2.0 beta here, bug-reports are more then welcome on GitHub as an issue.

I’m pretty excited about this new version, so I’m looking forward to your feedback! Who knows we can push this out before the year is over?

Fixing Firefox’ LessChromeHD to reclaim lost screen real estate

I had been happily auto-hiding the Firefox navigation bar on my small-screen netbook for a couple of years already, until that add-on (LessChromeHD from the Prospector series) stopped working after having upgraded to Firefox 35. So I started Firefox from the command-line and spotted this error:

addons.xpi WARN Error loading bootstrap.js for lessChrome.HD@prospector.labs.mozilla: TypeError: redeclaration of variable event (resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///home/frank/.mozilla/firefox/jy6bws91.default/extensions/lessChrome.HD@prospector.labs.mozilla.xpi!/bootstrap.js:226:8)

A quick look at the source code confirmed “event” was declared twice, once on line 210 and a second time on line 226. The fix, obviously, is simple; on lines 226-228 replace all references to “event” with e.g. “shownEvent”;

let shownEvent = document.createEvent("Event");
shownEvent.initEvent("LessChromeShown", true, false);
trigger.dispatchEvent(shownEvent);

You can do this yourself by unzipping “lessChrome.HD@prospector.labs.mozilla.xpi” in your extenstions-folder, editing boostrap.js and updating the xpi. Or you could wait for the Mozillians to update LessChromeHD.

Uw eigen mobielere deredactie in 5 stappen

openshift configureer uw redactieuwredacie op openshift uwredactie op openshiftOok al kunt ge mijn alternatieve mobiele redactie hier bekijken, dan zout ge toch, om redenen die geheel de uwe zijn, misschien liever uw hoogst persoonlijke redactie hebben?

Wel, dat kan in 5 eenvoudige stappen dankzij Openshift, het freemium PAAS platform van Red Hat en dat gaat ongeveer zo:

  1. Maak een gratis account aan bij Openshift
  2. Klik op “Create your first application now
  3. Vul PHP in in het zoekvenster en selecteer de PHP 5.4 cartridge
  4. Vul een naam in voor de public URL, copy/paste https://github.com/futtta/redactie in het source code veld en klik op “Create application
  5. Even geduld terwijl uw eigenste redactie wordt aangemaakt. In het laatste scherm kunt ge eventueel git access configureren (“Will you be changing the code of this application?”) of direct op “Visit app in the browser” (in mijn geval naar http://mijnredactie-futtta.rhcloud.com/) klikken.

Spreading the news, tiens!