This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# How to use: | |
# | |
# Ubuntu 16.04: apt install -y python-boto OR apt install -y python3-boto | |
# | |
# Specify the default profile on aws/boto profile files or use the optional AWS_PROFILE env var: | |
# AWS_PROFILE=example ./dehydrated -c -d example.com -t dns-01 -k /etc/dehydrated/hooks/route53.py | |
# | |
# Manually specify hosted zone: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'core_version_check_locale', function () { | |
return 'en_US'; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var browserSync = require("browser-sync"); | |
browserSync({ | |
proxy: 'localhost:9292', | |
files: [ | |
"./css/**/*", | |
"./js/**/*", | |
"./images/**/*", | |
"./fonts/**/*", | |
"./**/*.php", | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'after_setup_theme', function() { | |
add_theme_support('editor-font-sizes', [ | |
[ | |
'name' => 'Small', | |
'size' => 12, | |
'slug' => 'small' | |
], | |
[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Unminify vendor scripts. | |
*/ | |
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { | |
add_action( 'admin_print_scripts', function () { | |
global $wp_scripts; | |
unminify_execute( [ | |
'react', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { compose } from '@wordpress/compose'; // compose == lodash.flowRight; | |
const inc = ( a ) => { | |
return a + 1; | |
}; | |
const square = ( a ) => { | |
return a * a; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ] || ''; | |
}, [] ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: () => ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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); } | |
' | |
); |