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
| #After login to mysql | |
| ## mysql -u <username> -p<password> | |
| #Then execute following command: | |
| SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); | |
| #@link: https://stackoverflow.com/a/36033983/773376 | |
| #@link: https://stackoverflow.com/questions/12932760/mysql-allow-invalid-dates-on-select/15960087 |
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
| <?php | |
| /** | |
| * File to remind myself what things may come handy | |
| * while I get stuck somewhere and don't have idea | |
| * why things aren't working. These tricks may help you | |
| * know the cause and solve the issue | |
| **/ | |
| //Checklist 1: Sometimes, your json_encode may return null or false. | |
| //So to know if there is some issue in json_encode itself, use this switch below | |
| $a = json_encode($b); //or $a = json_encode($b, JSON_UNESCAPED_UNICOD); |
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
| ## Install docker on ubuntu | |
| # Refer link : | |
| https://www.docker.com/products/docker-toolbox | |
| # Refer GuidLines : | |
| https://docs.docker.com/toolbox/toolbox_install_windows/ | |
| ## Install docker on ubuntu | |
| # Refer link | |
| https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04 | |
| https://docs.docker.com/compose/install/#alternative-install-options |
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
| ## PHP API SETUP | |
| # First step to install composer : | |
| # (For Windows) : | |
| https://getcomposer.org/Composer-Setup.exe | |
| # (For Linux) : | |
| 1. php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
| 2. php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
| 3. php composer-setup.php | |
| # Second step to move the attach file where the php code running : (either xampp/wampp) |
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
| ## How to import data | |
| # Refer link : | |
| https://docs.woocommerce.com/document/importing-woocommerce-dummy-data/ | |
| https://woocommerce.com/theme-demo-content/ | |
| ## WooCommerce dummy data | |
| # Refer link : | |
| https://github.com/woocommerce/woocommerce/blob/master/dummy-data/dummy-data.xml | |
| https://github.com/woocommerce/woocommerce/tree/master/dummy-data |
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
| <?php | |
| /** set up exception handler to report what we didn't catch **/ | |
| function exception_handler($exception) { | |
| if($exception instanceof MyException) { | |
| echo "you didn't catch a myexception instance\n"; | |
| } else if($exception instanceof Exception) { | |
| echo "you didn't catch a exception instance\n"; | |
| } else { | |
| echo "uncaught exception of type: ".gettype($exception)."\n"; |
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
| version: '2' | |
| services: | |
| wordpress: | |
| image: wordpress:latest # https://hub.docker.com/_/wordpress/ | |
| ports: | |
| - 127.0.0.1:85:80 # change ip if required | |
| volumes: | |
| - ./test:/var/www/html # Full wordpress project | |
| - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini | |
| #- ./plugin-name/trunk/:/var/www/html/wp-content/plugins/plugin-name # Plugin development |
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
| ## Create uploads.ini then, content is | |
| file_uploads = On | |
| memory_limit = 64M | |
| upload_max_filesize = 64M | |
| post_max_size = 64M | |
| max_execution_time = 600 | |
| ## use this solution, to replace uploads.ini | |
| db: | |
| image: mysql:latest |
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
| ## Learn sass | |
| # Refer link : | |
| http://sass-lang.com/documentation/file.SASS_REFERENCE.html | |
| ## First we install npm and nodejs (npm + nodejs) | |
| #refer link : | |
| https://tecadmin.net/install-latest-nodejs-npm-on-ubuntu/# | |
| ## Second install grunt | |
| #refer link : |
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
| ## Google Chrome | |
| # Become the root user by running the su command and then enter the super-user password. Type: | |
| sudo -s | |
| # Create a directory called plugins if you do not have it. Type: | |
| mkdir -p /opt/google/chrome/plugins | |
| # Go to Google chrome plugins directory before you make the symbolic link. Type: | |
| cd /opt/google/chrome/plugins | |
| # Create a symbolic link. Type: | |
| ln -s /usr/local/java/jre1.7.0/lib/amd64/libnpjp2.so | |
| # Restart your browser and test Java |
OlderNewer