このメモは、私(@ymmt2005)が長年にわたってソフトウェアプロダクト開発に関わってきて 2022年現在こうしたほうが良いと考えているベストプラクティスです。
科学的な分析等に基づくわけではない経験則であるため、今後も随時見直すことがありますし、 ここに書いてあることが常に正しいわけでもあらゆるソフトウェア開発に適するわけでもありません。
しかしながら、実務経験が豊富で、モダンな技術スタックに明るいエンジニアの経験則は一定の 役に立つのではないかと考えて記します。
| var browserSync = require("browser-sync"); | |
| browserSync({ | |
| proxy: 'localhost:9292', | |
| files: [ | |
| "./css/**/*", | |
| "./js/**/*", | |
| "./images/**/*", | |
| "./fonts/**/*", | |
| "./**/*.php", | |
| ] |
| <?php | |
| /** | |
| * Plugin Name: Convert ACF PHP to JSON | |
| * Description: Convert Advanced Custom Fields Pro configuration from PHP to JSON. | |
| */ | |
| namespace ConvertAcfPhpToJson; | |
| /** | |
| * Add submenu item under 'Custom Fields' |
| <?php | |
| /** | |
| * The purpose of this code is to show how you can use theme mods that will fall back to | |
| * the already-set mods of the parent theme. So, when a child theme is active, the code | |
| * checks, in the following order: 1) child theme mod, 2) parent theme mod, 3) default. | |
| */ | |
| function jt_get_theme_mod( $name, $default = false ) { | |
| if ( is_child_theme() ) |
| #!/bin/bash | |
| # file: ttfb.sh | |
| # curl command to check the time to first byte | |
| # ** usage ** | |
| # 1. ./ttfb.sh "https://google.com" | |
| # 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com" | |
| curl -o /dev/null \ | |
| -H 'Cache-Control: no-cache' \ | |
| -s \ |
I thought it would be pertinent to respond to some points presented by Andrey "Rarst" Savchenko in recent post Progressive Enhancement.
Unlike Rarst, I don't value progressive enhancement very highly and don't agree it's a fundamental principle of the web that should be universally employed. Quite frankly, I don't care about not supporting JavaScript, and neither does virtually anyone else. It's not that it doesn't have any value, or utility - but in a world where we don't have unlimited resources and time, one has to prioritise what we'll support and not support.
I'm a proponent of putting my ideas and creations into the world for people to make use of; and if I had to cover 100% of use cases for doing that, I wouldn't put much out there. I'm fine with losing the 1.1% of
| <?php | |
| /** | |
| * Plugin Name: Multisite: Passwort Reset on Local Blog | |
| * Plugin URI: https://gist.github.com/eteubert/293e07a49f56f300ddbb | |
| * Description: By default, WordPress Multisite uses the main blog for passwort resets. This plugin enables users to stay in their blog during the whole reset process. | |
| * Version: 1.0.0 | |
| * Author: Eric Teubert | |
| * Author URI: http://ericteubert.de | |
| * License: MIT | |
| */ |
| <?php | |
| /** | |
| * Plugin Name: Static Templates | |
| * | |
| * If most of your site content is in .php template files, and you're tired of | |
| * creating new pages, assigning them page templates, creating page templates | |
| * then doing it all over again on production, this plugin is for you. | |
| * | |
| * Examples: | |
| * |