PHPNews

Bash/Shell Autocompletion for Composer

The other day I opened up a PHP project that I hadn’t worked on in a while. No longer remembering which Composer Scripts I had defined for it, I needed to take a peek inside composer.json to see which ones were available to me. Then it hit me: why is there no autocompletion for composer available? Googling …

Continue reading »

Written by Bram.us - - Aggregated on Thursday May 16, 2019


Making Future Interfaces: ES Modules

Once again a highly entertaining video by Heydon Pickering. This time he’s tackling ES Modules: how and where (e.g. in which browsers) can you use them? Even if you already know how to ship ES2015 JavaScript to browsers the video still is worth your time, as it’s very fun to watch!

Continue reading »

Written by Bram.us - - Aggregated on Tuesday April 30, 2019


Disable Hardware Media Keys Support in Chrome

A new feature that landed in Chrome 73 is support for hardware Media Keys . Whenever you press one of the play/pause/next/prev buttons on your keyboard, Chrome can now respond to this. video.addEventListener('pause', function() { // Video is now paused. // TODO: Let's update UI accordingly. }); video.addEvent…

Continue reading »

Written by Bram.us - - Aggregated on Friday April 26, 2019


Fading out siblings on hover in CSS

Nice one by Trys Mudford: Hover states traditionally run on the element being hovered on (makes sense, right?). But we can also listen for the hover event on the parent element. That’s the crux of this ‘trick’, we fade out all children when the parent is hovered, and attach another hover handler the child, …

Continue reading »

Written by Bram.us - - Aggregated on Thursday April 25, 2019


Direction Aware Hover Effect

A thing I commonly see nowadays are animated lines underneath menus and links: Show Pen One issue with that though: when hovering over an item the animation does not start from the place where you hover, but from a fixed point (here: bottom-center) . Try hovering an item from one of its edges and you’ll …

Continue reading »

Written by Bram.us - - Aggregated on Thursday April 25, 2019


Unsafe SQL functions in Laravel

Recently the folks from Spatie released a security update for their laravel-query-builder package. Turns out it was vulnerable to SQL Injection. At the core of the vulnerability is the fact that Laravel offers a shorthand for querying only certain fields of JSON data, but that these do not get escaped when …

Continue reading »

Written by Bram.us - - Aggregated on Friday April 12, 2019


HTML slides without frameworks, just CSS

Creating a slidedeck with CSS is not really that difficult. Stack all slides on top of each other, and then make good use of the :target pseudo-class selector: We adjust the z-index for the active slide to be higher than all the other inactive slides with our trusty :target selector. section { height: …

Continue reading »

Written by Bram.us - - Aggregated on Friday April 12, 2019


Automatic GitHub Changelog Generator

If your code/project always uses Pull Requests to add/fix stuff in your code (e.g. no direct commits on master ), then Changelog Generator will come in handy. It’s a CLI tool (written in PHP) that automatically fetches all closed PRs and Issues between the targetted and the previously tagged release. Installation …

Continue reading »

Written by Bram.us - - Aggregated on Friday April 12, 2019


AV1, the video codec of the future

Next to praising the AV1 Codec and providing conversion examples (using ffmpeg ) , Andrey Sitnik also gives a good overview on containers and codecs – concepts every web developer who embed video should know imho – in his post on the subject: File extensions for video ( .mp4 , .wmv , .webm or .mov ) barely …

Continue reading »

Written by Bram.us - - Aggregated on Friday April 12, 2019


Deno, a new way to JavaScript

Ryan Dahl – inventor of Node.js – has been working on Deno, a new take on Node as if it were designed today. From async-await to ArrayBuffers, the JavaScript language has changed significantly in the decade since Node.js was designed. Deno takes advantage of these developments and incorporate lessons learned in …

Continue reading »

Written by Bram.us - - Aggregated on Wednesday April 10, 2019


Editor.js – Next generation block styled editor

Editor.js is a so called “block style editor” like the one Medium (and recently WordPress) sport. The Editor.js workspace consists of separate Blocks: paragraphs, headings, images, lists, quotes, etc. Each of them is an independent contenteditable element (or more complex structure) provided by Plugin and united by …

Continue reading »

Written by Bram.us - - Aggregated on Wednesday April 10, 2019


New WebKit Features in Safari 12.1

Jonathan Davis – Web Technologies Evangelist for Apple – has done a writeup on the new features that have landed in Safari 12.1, which is included with macOS Mojave 10.14.4 and iOS 12.2. This release delivers web platform features that improve website integration with the operating system, new real-time communicat…

Continue reading »

Written by Bram.us - - Aggregated on Tuesday April 9, 2019