- XAMPP for Windows: https://www.apachefriends.org/download.html
- Download Xdebug for:
INSERT INTO table1 ( column1 )
SELECT col1
FROM table2 Example: if you have users(id, email) and user_meta(user_id, key, value) tables where you have phone, age etc keys in user_meta but need to show these as columns with users table
For quick access or when enabling remote access is not possible, ssh tunneling/port forwarding can be used to access a database (that is not allowed to be accessed remotely) temporarily
First create a SSH session with port forwarding
ssh -L 3300:localhost:3306 user@server
Then connect using the local port on local machine
| #!/bin/bash | |
| # get wp-cli | |
| # curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && chmod +x wp-cli.phar && sudo mv wp-cli.phar /usr/local/bin/wp | |
| # wp-cli auto-completion | |
| # wget https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash && source wp-completion.bash && echo -e "\nsource wp-completion.bash" >> .bashrc | |
| #verify if wp-cli correctly installed | |
| # wp --info |
| # wordpress-seo provides ability to edit meta information and provides sitemap. | |
| # w3-total-cache provides advanced caching no matter the server technology available. | |
| # better-wp-security provides brute force protection and a number of WordPress enhancements. | |
| # google-analytics-for-wordpress provides robust Google Analytics integration through the Google API. | |
| # redirection detects 404s and 301s and allows admins to set up redirects in the WP admin. | |
| # ewww-image-optimizer provides automatic optimization of uploaded images with local libraries instead of cloud-based services. | |
| # backupwordpress simple backup solution that can store backups above web root. | |
| # relevanssi provides better site search using a local index. | |
| # cloudflare is the best. Free automatic CDN and security solution. | |
| # jarvis is a quick search for the WordPress admin. Indespensible. |
| # Create directory for new site | |
| cd ~/Sites | |
| mkdir {query} | |
| cd {query} | |
| # Download latest version of WordPress | |
| wp core download | |
| # Setup wp-config file with WP_DEBUG enabled | |
| wp core config --dbname={query} --dbuser=root --dbpass=root --dbprefix={query}wp_ --extra-php <<PHP |
| #!/bin/bash | |
| # Default options | |
| LOCALE="fr_FR" | |
| DB_HOST='localhost' | |
| VIRUSTOTAL_KEY='YOUR_KEY' | |
| printf "Name of the project? cf My Project: " | |
| read PROJECT_NAME |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed
| #!/bin/bash | |
| echo "installing WP test content" | |
| wp plugin install wordpress-importer --activate | |
| curl -OL https://raw.githubusercontent.com/manovotny/wptest/master/wptest.xml | |
| wp import wptest.xml --authors=create | |
| wp plugin uninstall wordpress-importer --deactivate | |
| rm wptest.xml |
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |