Workaday Reading

vimeo autoplay=1 no longer working in Chrome

“I recently developed a website that has a streaming video as its full-screen background that autoplays & loops when the website loads. It was working in Chrome until very recently. Google changed their policy on autoplaying video in April, so I believe this may be the reason.”


read »

Workaday Reading

Build your own Command Line with ANSI escape codes

“Everyone is used to programs printing out output in a terminal that scrolls as new text appears, but that’s not all your can do: your program can color your text, move the cursor up, down, left or right, or clear portions of the screen if you are going to re-print them later.”


read »

Workaday Reading

Content negotiation

“In HTTP, content negotiation is the mechanism that is used for serving different representations of a resource at the same URI, so that the user agent can specify which is best suited for the user (for example, which language of a document, which image format, or which content encoding).”


read »

Workaday Reading

JavaScript error reference

“Below, you’ll find a list of errors which are thrown by JavaScript. These errors can be a helpful debugging aid, but the reported problem isn’t always immediately clear. The pages below will provide additional details about these errors.”


read »

Workaday Reading

Player

“An instance of the Player class is created when any of the Video.js setup methods are used to initialize a video. In the following example, the data-setup attribute tells the Video.js library to create a player instance when the library is ready.”


read »

Workaday Reading

components

“The architecture of the Video.js player is centered around components. The Player class and all classes representing player controls and other UI elements inherit from the Component class. This architecture makes it easy to construct the user interface of the Video.”


read »

Workaday Reading

Git Catastrophes and Tips to Avoid Them

“In this post, I’d like to highlight some git features that might be less used/known, but can end up saving your @$$ when things go south in the codebase. Fortunately, it is really hard to irrevocably mess something up with git, as long as you have the .git hidden folder in your project intact!”


read »

Workaday Reading

Storing and retrieving audio (mp3) with localForage

“However I want to store / cache the loaded mp3 locally so that the user only has to download it once and the app can work offline. The files are approx 750 KB. In the example below the file is only 74 KB. However I can’t seem to retrieve the audio in a format I can play…”


read »

Workaday Reading

How To Enable SFTP Without Shell Access on Ubuntu 16.04

“SFTP stands for SSH File Transfer Protocol. As its name suggests, it’s a secure way of transferring files to a server using an encrypted SSH connection. Despite the name, it’s a completely different protocol than FTP (File Transfer Protocol), though it’s widely supported by modern FTP clients.”


read »

Workaday Reading

Global space

“Without any namespace definition, all class and function definitions are placed into the global space – as it was in PHP before namespaces were supported. Prefixing a name with \ will specify that the name is required from the global space even in the context of the namespace.”


read »

Workaday Reading

HTTP 2 Server Push

“A year ago, I posted an article explaining the general concept of HTTP 2.0. Today we can finally use it for building websites as it is now supported by major browsers. This article will focus on HTTP 2.0 – Server Push, from what it is, the problems it solves, how to implement it (using commons.”


read »

Workaday Reading

Using Object Spread Operator

“Since one of the core tenets of Redux is to never mutate state, you’ll often find yourself using Object.assign() to create copies of objects with new or updated values. For example, in the todoApp below Object.”


read »