Remember, there are 'TWIG' tools and then there are 'Timber' tools.
The second is WordPress specific.
| <?php | |
| /** | |
| * Preloading WordPress assets without a plugin. | |
| * Change function name to something more unique. | |
| * Priority is set to 0 to include as high in the <head> DOM as possible. Change priority if needed. | |
| * Use WordPress is_page() to target specific page or is_front_page() to target ONLY homepage as in Option #1 | |
| * If asset needs to be preloaded globally use Option #2. | |
| * For multiple assets clone the link tag instead of the entire echo block. | |
| * Change 'as' attribute accordingly. Values for 'as' can be found here https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-as. | |
| * Use abolute paths. For external assets paste the url, for internal assets use WordPress functions to construct URL. |
| <?php | |
| defined( 'ABSPATH' ) or die; | |
| namespace Kevin; | |
| class Router extends \WP_REST_Controller | |
| { | |
| protected static $instance = null; | |
| public function getHandler($namespace, $endpoint, $callback) { | |
| \register_rest_route( |
| import apiFetch from '@wordpress/api-fetch' | |
| // This is also set up to clone fields from an existing image. | |
| // Just remove imageToClone and supply the missing fields on your own. | |
| export const uploadImage = async (image: ImageData, imageToClone: WpImage): Promise<WpImage | undefined> => { | |
| const canvas = document.createElement('canvas') | |
| canvas.width = image.width | |
| canvas.height = image.height | |
| const ctx = canvas.getContext('2d') | |
| if (!ctx) return |
| #!/bin/bash | |
| # Change directory to /home | |
| cd /home | |
| # Iterate through all users directories | |
| for user in * ; do | |
| # For every webapp under the user directory | |
| # Count wp-config files to make sure its Wordpess |
| export const isValidJson = (str) => { | |
| try { | |
| JSON.parse(str) | |
| return true | |
| } catch (e) { | |
| return false | |
| } | |
| } |
| /** | |
| * WordPress dependencies. | |
| */ | |
| import api from '@wordpress/api'; | |
| import { __ } from '@wordpress/i18n'; | |
| import { dispatch } from '@wordpress/data'; | |
| import { |
| /** | |
| * WordPress dependencies. | |
| */ | |
| import { useDispatch, useSelect } from '@wordpress/data'; | |
| /** | |
| * useMeta Hook. | |
| * | |
| * useMeta hook to get/update WordPress' meta fields. | |
| * |
Systems Engineering (also known as Infrastructure Engineering, Operations Engineering, or DevOps) is a challenging but rewarding career path. Because Systems Engineering draws from a wide variety of smaller topics, it can be hard to know where to start and in what order to begin. This resource is intended to give you a sketch of some of the learning-paths that that can lead you to a career in Systems Engineering.
To start, let's examine a high-level list of topics that established systems engineers should have knowledge of. In each of these topics, the level of depth required to get started as a systems engineer may vary, but it's good to have a general breadth of knowledge on all of these topics.
These lists are not exhaustive, rather a good starting point to gain general knowledge.