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
| #!/bin/sh | |
| # | |
| # nginx - this script starts and stops the nginx daemin | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
| # proxy and IMAP/POP3 proxy server | |
| # processname: nginx | |
| # config: /usr/local/nginx/conf/nginx.conf | |
| # pidfile: /usr/local/nginx/logs/nginx.pid |
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
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: php-fpm | |
| # Required-Start: $remote_fs $network | |
| # Required-Stop: $remote_fs $network | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: starts php-fpm | |
| # Description: starts the PHP FastCGI Process Manager daemon |
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
| history.pushState('', document.title, '?page='+page+'&limit='+pageSize) |
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
| SELECT SQL_CALC_FOUND_ROWS * FROM article limit 10; | |
| SELECT FOUND_ROWS(); |
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
| // fix : Possibly unhandled rejection: canceled | |
| // for angularjs >= 1.6.0 | |
| // https://github.com/angular-ui/ui-grid/issues/5890 | |
| app.config(['$qProvider', function ($qProvider) { | |
| $qProvider.errorOnUnhandledRejections(false); | |
| }]); |
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
| # check memory size | |
| free | |
| # make space 1GB | |
| dd if=/dev/zero of=/var/swapfile bs=1024 count=1000000 | |
| # make swap file format | |
| mkswap /var/swapfile | |
| # activate |
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
| $sql =<<<SQL | |
| SELECT | |
| COUNT(*) | |
| , id | |
| FROM | |
| example_table | |
| SQL; |
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
| find . -name '*DS_Store' -exec rm -rf {} \; |