Ubuntu / Debian で、コマンドでネットワーク周りを調べるためのコマンドのメモ。
$ nmcli dev wifi|---| |---| |---| |---| |---| |---| |---| |---| |---| |---| |---| |---|
|---| |---| |---| |---| |---| |---| |---| |---| |---| |---| |---| |---|
|---| |---| |---| |---| |---| |---| |---| |---| |---| |---| |---| |---|
のような Grid の 横幅算出の アルゴリズムについて
全体の横幅を T (100%)、カラムの間の Gap を G、gridの分割数を、S とする。
| <?php | |
| add_action( 'admin_enqueue_scripts', function () { | |
| if ( get_option( 'page_on_front' ) === filter_input( INPUT_GET, 'post' ) ) { | |
| wp_add_inline_style( | |
| 'wp-edit-post', | |
| ' | |
| .block-editor-writing-flow { --block-width: 1136px; } | |
| .wp-block { max-width: var(--block-width); } | |
| ' | |
| ); |
| import { registerBlockType } from '@wordpress/blocks'; | |
| import { InnerBlocks } from '@wordpress/block-editor'; | |
| import { __ } from '@wordpress/i18n'; | |
| registerBlockType( 'my/card', { | |
| attributes: {}, | |
| category: 'layout', | |
| supports: { | |
| anchor: true, | |
| }, | |
| icon: () => ( |
| import { Fragment, useCallback } from '@wordpress/element'; | |
| import { useDispatch, useSelect } from '@wordpress/data'; | |
| const useMeta = ( key ) => { | |
| const meta = useSelect( ( select ) => { | |
| const { getEditedPostAttribute } = select( 'core/editor' ); | |
| const values = getEditedPostAttribute( 'meta' ) || {}; | |
| return values[ key ] || ''; | |
| }, [] ); |
| #!/usr/bin/env bash | |
| set -e | |
| echo '{ | |
| "nginx" : { "config" : { "user" : "ec2-user" } }, | |
| "php" : { "config" : { "user" : "ec2-user" } }, | |
| "run_list" : [ "recipe[amimoto]" ] | |
| }' > /opt/local/amimoto.json | |
| /opt/local/provision |
| import { compose } from '@wordpress/compose'; // compose == lodash.flowRight; | |
| const inc = ( a ) => { | |
| return a + 1; | |
| }; | |
| const square = ( a ) => { | |
| return a * a; | |
| }; |
| <?php | |
| /** | |
| * Plugin Name: Unminify vendor scripts. | |
| */ | |
| if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { | |
| add_action( 'admin_print_scripts', function () { | |
| global $wp_scripts; | |
| unminify_execute( [ | |
| 'react', |
| <?php | |
| add_action( 'after_setup_theme', function() { | |
| add_theme_support('editor-font-sizes', [ | |
| [ | |
| 'name' => 'Small', | |
| 'size' => 12, | |
| 'slug' => 'small' | |
| ], | |
| [ |
| var browserSync = require("browser-sync"); | |
| browserSync({ | |
| proxy: 'localhost:9292', | |
| files: [ | |
| "./css/**/*", | |
| "./js/**/*", | |
| "./images/**/*", | |
| "./fonts/**/*", | |
| "./**/*.php", | |
| ] |