Published

Resolving Craft 3 Setup Wizard error

I keep encountering issues when running Craft’s setup command locally. Note that I use MAMP Pro for this sort of thing. I entered all the database creds correctly, and then got a SQLSTATE[HY000] [2002] No such file or directory error. This StackExchange answer sorted it for me. Add 'unixSocket' => getenv('DB_SOCKET') to /config/db.php and DB_SOCKET="/Applications/MAMP/tmp/mysql/mysql.sock" to .env.

Still encountering database connection issues on staging for one site currently under development. All of the credentials are set correctly in .env, but getenv() in /config/db.php retrieves the wrong DB_USER value. Ended up explicitly adding the problematic value to the /config/db.php file as a quick workaround, but it’s not ideal.

Published

Exploring the use cases for serverless website architecture

Last Saturday, Sam introduced me to Chris Coyier’s talk on serverless-ness, The All-Powerful Front-End Developer. Pretty interesting and useful. I’m glad he leads it by breaking down the problematic nature of the word “serverless”! The following day was spent in agorama’s p2p workshop at furtherfield. Coincidentally, there is a lot of overlap in these topics.

I’ve spent the past few days wrapping my head around all of this, contextualising it against the sorts of concerns and projects we work with. Though I desperately want to get going with Dat, I’m starting with serverless because it may solve an urgent need in my day-to-day work. Right now, I’m spending much more time than I realistically can maintaining CMSs and hosting environments for older websites.

All of the below is a thought dump on the topic, an attempt to pick apart the meaning of and the use cases for a serverless website architecture.

Read more

Published

cURL + Airtable + ./jq = squeaky clean JSON

We’re working on a new site for SB-PH at the moment, and we’re using Airtable to get our project documentation together. It’s also a good opportunity to test the platform a little (+ I’m a fan of tables). To grab tidy JSON for use with data-friendly design software like Sketch, we’re using the Airtable API with cURL and ./jq.

Simple example that dumps table records in to a JSON file for use with the the Sketch Data Populator plugin:

$ curl https://api.airtable.com/v0/YOUR_BASE_KEY/YOUR_TABLE_NAME -H "Authorization: Bearer YOUR_API_KEY" | jq '.records' > records.json

Published

Research involving NAS, backups, storage, etc.

Aside: Thumbs up to Katie Floyd’s Policies info. Super clear.

Edit: See well-timed Guardian article “Ask Jack: Should I buy a NAS drive to back up my laptop?”

Edit 15 March 2019: Katie Floyd seems to have taken her site offline, and her post about NAS usage isn’t archived in the Wayback Machine. 🙁

Published

Chinese web font research

Did some research on Chinese web font best practices a while back when working on Memory Machine for Tyler Coburn + Asia Art Archive with Luke Gould. It was an interesting challenge. This was my overall takeaway from the research:

  • Self-hosted fonts are out, the font files are prohibitively enormous due to the number of characters
  • The Great Firewall can cause issues with most font services, so no Google Fonts or Typekit
  • If you need to render a mixture of Latin and Chinese characters and want them to use different fonts, the font stack structure and naming is critical (see article by Kendra Schaefer for more info)
  • Bold and italic should never be used for emphasis on Chinese characters since it distorts their meaning

Read more

Published

Shopify theme dev notes, early 2018

We’re picking up a Shopify site that was put on hold for a little bit, and I’m pleasantly surprised by a few things I’ve come across. The pause might have been blessing in disguise for the site on the whole. The dev tools have progressed a bit during the hiatus, and I’ve come across a Sections workaround that might 🤞 give a little more content flexibility beyond the homepage.

Read more

Published

On archiving/preserving websites

SB and I have been chatting about the whys, whens and hows involved in archiving a website. Archiving is always an uphill battle. It’s hard to take care of things as they age no matter what the material, and ageing code comes with a specific set of worries.

Read more

Published

WordPress security resources

Links to a few of the security resources I find useful, some WordPress-specific and some more general.

A note about that “step-by-step” guide: it’s pretty decent, but IMO Wordfence is a better security plugin to go with. Sucuri is maybe more user-friendly, but Wordfence comes with more out-of-the-box (incl. two factor authentication and login limiting) and the settings seem more granular. Doesn’t hurt to try both though to see what’s the best fit.


Last edited 22 June 2019