Git –assume-unchanged

When installing apps locally some files have data which is unique to your install path or domain. For example I installed our app at EasyRx locally and the yaml setting for the domain used for cookies was tracked by git. I changed the value in my local install but then it showed up as a … Continued

How to convert your latin1 mysql table to utf8

Convert the existing columns content if there are unicode characters saved in non utf8 column: Have MYSQL loop through . all of your tables and columns finding all the necessary columns which have types needing to be converted: You will get queries like these which can be ran: Then we update the each tables overarching … Continued

JSON encoding Windows-1252 Unicode chars

While trying to use the json_encode function a Windows-1252 left and right quote character was breaking the encoding and I was ending up with no JSON. The string being encoded was from html within a PHP file. I’m guessing it was copy pasted from a Word doc. To fix this the mb_convert_encoding function, not the utf8_encode function, was needed. From … Continued

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 »

Advanced Custom Fields — Update a Group Sub Field From Within a Flexible Content Field

 

 

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 »

Updating MAMP (ramblings whilst trying to update mamp)

Updating MAMP (ramblings whilst trying to update mamp)

I am a MAMP user. I’ve used it since March of 2014. I have lot’s of projects in my MAMP’s htdoc directory. I could probably clean them out/archive them, more often then I do but I don’t (I have it all on Github so there’s really no reason why). In any case, I quickly learned … Continued