One-time Dependency Setup/Configuration
wget https://getcomposer.org/download/1.1.0/composer.phar && chmod +x composer.phar && sudo mv /usr/local/bin/composer && composer self-update
| ( function( wp ) { | |
| var el = wp.element.createElement; | |
| var __ = wp.i18n.__; | |
| wp.blocks.registerBlockType( 'learn-gutenberg/ex2-vue', { | |
| title: __( 'Learn Gutenberg Example 2: VueJS', 'learn-gutenberg' ), | |
| category: 'widgets', | |
| supportHTML: false, | |
| attributes: { | |
| who: { |
| ## How to hide API keys from github ## | |
| 1. If you have already pushed commits with sensitive data, follow this guide to remove the sensitive info while | |
| retaining your commits: https://help.github.com/articles/remove-sensitive-data/ | |
| 2. In the terminal, create a config.js file and open it up: | |
| touch config.js | |
| atom config.js |
| const arr1 = [1,2,3] | |
| const arr2 = [4,5,6] | |
| const arr3 = [...arr1, ...arr2] //arr3 ==> [1,2,3,4,5,6] |
| /* bling.js */ | |
| window.$ = document.querySelector.bind(document); | |
| window.$$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
| NodeList.prototype.__proto__ = Array.prototype; | |
| NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
| <?php | |
| add_action('wp_ajax_register_user_front_end', 'register_user_front_end', 0); | |
| add_action('wp_ajax_nopriv_register_user_front_end', 'register_user_front_end'); | |
| function register_user_front_end() { | |
| $new_user_name = stripcslashes($_POST['new_user_name']); | |
| $new_user_email = stripcslashes($_POST['new_user_email']); | |
| $new_user_password = $_POST['new_user_password']; | |
| $user_nice_name = strtolower($_POST['new_user_email']); | |
| $user_data = array( | |
| 'user_login' => $new_user_name, |
| #add 'node_modules' to .gitignore file | |
| git rm -r --cached node_modules | |
| git commit -m 'Remove the now ignored directory node_modules' | |
| git push origin <branch-name> |