Lookup the open port:
iptables -L -n
Add new open port:
//open 8080 port
iptables -I IN_public_allow -p tcp --dport 8080 -j ACCEPT
| <?php | |
| /** | |
| * @param WP_Query|null $wp_query | |
| * @param bool $echo | |
| * @param array $params | |
| * | |
| * @return string|null | |
| * | |
| * UPDATE for Bootstrap 5.0: https://gist.github.com/mtx-z/af85d3abd4c19a84a9713e69956e1507 | |
| * |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Document</title> | |
| </head> |
| <?php | |
| /** | |
| * Add meta fields support in rest API for post type `Post` | |
| * | |
| * This function will allow custom parameters within API request URL. Add post meta support for post type `Post`. | |
| * | |
| * > How to use? | |
| * http://mysite.com/wp-json/wp/v2/posts?meta_key=<my_meta_key>&meta_value=<my_meta_value> | |
| * | |
| * > E.g. Get posts which post meta `already-visited` value is `true`. |
Lookup the open port:
iptables -L -n
Add new open port:
//open 8080 port
iptables -I IN_public_allow -p tcp --dport 8080 -j ACCEPT
| ln -s /usr/local/opt/readline/lib/libreadline.7.0.dylib /usr/local/opt/readline/lib/libreadline.6.dylib |
quando ler <Prefix> será o padrão
Ctrl + b
| <?php // <-- don't add this in your functions.php if already there | |
| /** | |
| * https://wordpress.org/support/plugin/popups | |
| * Allow editors to edit popups | |
| * For more roles check https://codex.wordpress.org/Roles_and_Capabilities | |
| */ | |
| add_filter('spu/settings_page/roles', 'my_custom_role'); | |
| function my_custom_role(){ | |
| return 'edit_others_posts'; | |
| } |
| <?php | |
| // Source: http://goo.gl/qyLFbg | |
| $html = '<img border="0" src="/images/image.jpg" alt="Image" width="100" height="100" />'; | |
| preg_match( '@src="([^"]+)"@' , $html, $match ); | |
| $src = array_pop($match); | |
| // will return /images/image.jpg |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.