Link Dump (05/29)

Dump of interesting stuff I read about this week:

My favourite line of CSS

A nice example of a fully responsive grid with no media queries.

tl;dr

grid-template-columns: repeat( auto-fill, minmax(min(calc(180px + 12vmin), 100%), 1fr));

Presspack

Toolchain for developing WordPress sites featuring:

  • Modern JavaScript through Webpack
  • Live reload via BrowserSync
  • SCSS support
  • Easy dev environments with Docker Compose
  • Stateless, immutable plugin management via Composer
  • Helpful HTML5 Router for firing JS based on WordPress page slug.

Timber and Twig

Twig is Symfony's template language for PHP.

Timber is a WordPress plugin that helps connect WordPress and Twig.

The result is MAGIC!

You get a very Laravel-esque MVC approach to WordPress theme development.

GenerateWP

An online tool for generating common WordPress code-snippets.

5 Types of ZSH Aliases

A handy reference of different types of ZSH aliases.

Outputting the SQL of an Eloquent query

Let's say you have a Laravel Eloquent query like this:

$things = Thing::where(DB::raw('LOWER(name)'), 'LIKE', 'foo')->get();

And then let's say you want to see the actual SQL that's being generated behind the scenes.

Laravel's Query Log to the rescue!

DB::enableQueryLog();
$things = Thing::where(DB::raw('LOWER(name)'), 'LIKE', 'foo')->get();
Log::debug(DB::getQueryLog());

All Posts