This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Spin up a docker mysql server with remote access | |
| docker run --name mysql-server \ | |
| -p 3306:3306 -p 33060:33060 \ | |
| -e MYSQL_ROOT_HOST='%' -e MYSQL_ROOT_PASSWORD='root' \ | |
| -d mysql/mysql-server:latest | |
| # login into the machine and create a nav user with nav password | |
| # connect | |
| mysql -u root -p -h 0.0.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Easiest way I've found to ignore those large files is the following: | |
| In the shell: | |
| Change to your Git repo directory | |
| find ./* -size +100M | cat >> .gitignore | |
| --- or use Git LFS: | |
| Git Large File Storage (LFS) replaces large files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Best for checking redirects and inspect headers: | |
| $ curl -sSLIXGET 'https://n4v.nl' | |
| # Fetch Multiple Files at a time | |
| $ curl -O URL1 -O URL2 | |
| $ curl -O http://n4v.nl -O http://nav.co.nl -O http://navappaiya.nl -O http://nirojan.nl | |
| #Send Mail with curl using the SMTP Protocol | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install php-xdebug | |
| zend_extension="/usr/lib/php/20151012/xdebug.so" | |
| php.ini: | |
| zend_extension="/opt/lampp/lib/php/extensions/xdebug.so" | |
| xdebug.remote_enable=1 | |
| xdebug.remote_host=127.0.0.1 | |
| xdebug.remote_port=9000 | |
| xdebug.idekey=PHPSTORM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo lsof -i :80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run -p 8080:80 -v $(pwd):/var/www/html --name lemp -d adhocore/lemp:7.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function my_custom_widgets_init() { | |
| register_sidebar( array( | |
| 'name' => __( 'Header Sidebar', 'custom widget' ), | |
| 'id' => 'header-sidebar', | |
| 'before_widget' => '<div>', | |
| 'after_widget' => '</div>', | |
| 'before_title' => '<h1>', | |
| 'after_title' => '</h1>', | |
| ) ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'; | |
| https://stackoverflow.com/questions/49194719/authentication-plugin-caching-sha2-password-cannot-be-loaded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # wp package install (no mem limit) | |
| php -dmemory_limit=-1 /usr/local/bin/wp package install pixline/wp-cli-php-devtools | |
| # Handy wp cli packages to install and use | |
| # Migration, Remotes & Deployments | |
| foogile/wp-cli-mig | |
| c10b10/wp-cli-deploy | |
| humanmade/wp-remote-cli |