brew install zsh
echo $(which zsh) | sudo tee -a /etc/shells
sudo chsh -s $(which zsh) $USER
| name: 'Bundle Size Comparison' | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest |
| /* Break out of a container in a WP site. */ | |
| /* Exclude blocks in the editor. */ | |
| .alignfull:not(.wp-block) { | |
| margin-left: calc( 50% - 50vw ); | |
| margin-right: calc( 50% - 50vw ); | |
| max-width: 100vw; | |
| } | |
| .alignwide { |
| <?php | |
| function register_custom_taxonomy() { | |
| $taxonomy_labels = [ | |
| 'name' => esc_html__( 'Custom Terms', 'text-domain' ), | |
| 'singular_name' => esc_html__( 'Custom Term', 'text-domain' ), | |
| 'menu_name' => esc_html__( 'Terms', 'text-domain' ), | |
| ]; | |
| $taxonomy_args = [ |
| /** | |
| * Custom WordPress block boilerplate. | |
| * | |
| * @package My_Block_Package | |
| * @author Alexis J. Villegas | |
| * @link http://www.alexisvillegas.com | |
| * @license GPL-2.0+ | |
| */ | |
| ( function( blocks, editor, element ) { |
| <?php | |
| /** | |
| * Add featured image column to WP admin panel - posts AND pages | |
| * See: https://bloggerpilot.com/featured-image-admin/ | |
| */ | |
| // Set thumbnail size | |
| add_image_size( 'j0e_admin-featured-image', 60, 60, false ); |
| #!/usr/bin/env bash | |
| # -*- coding: utf-8 -*- | |
| # vim: set ft=sh et ts=4 sw=4 sts=4: | |
| # INFO | |
| # -------------------------------------------------------------------------------------- | |
| # Free up disk space on Debian, Ubuntu - clean log, cache, archive packages/apt archives, | |
| # orphaned packages, old kernel and remove the trash | |
| # | |
| # Gist repo: |
| <?php | |
| $key_file_path = __DIR__ . '/service-account-credentials.json'; | |
| $google_client = new \Google_Client(); | |
| $google_client->setAuthConfig( $key_file_path ); | |
| // Set the scopes of whatever you need access to | |
| // See https://developers.google.com/identity/protocols/oauth2/scopes | |
| $google_client->setScopes( array( 'https://www.googleapis.com/auth/analytics.readonly' ) ); | |
| $http_client = $client->authorize(); |
| <?php | |
| function rh_filter_the_content( $the_content = '' ) { | |
| $blocks = parse_blocks( $the_content ); | |
| $new_block = array( | |
| 'blockName' => 'core/paragraph', | |
| 'attrs' => array(), | |
| 'innerBlocks' => array(), | |
| 'innerHTML' => '<p>Hello World</p>', | |
| 'innerContent' => array( | |
| '<p>Hello World</p>', |
| <?php | |
| /** | |
| * A function that takes an array of HTML attribute | |
| * key/value pairs and returns a string of HTML attributes. | |
| **/ | |
| function unwrap_html_attrs($attrs) | |
| { | |
| $attributes = ''; |