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
upstream php-fpm { | |
server unix:/var/run/php5-fpm.sock; | |
} | |
server { | |
listen 80; | |
server_name www.example.com; | |
rewrite ^ http://example.com$request_uri?; | |
} |
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
## Execute a command with the current environment extended | |
## | |
## The PHP_IDE_CONFIG set the serverName with the value defined in PHPStorm's server seccion. With this value PHPStorm | |
## will not create a new server each time that lisen a new connection. The value does not affect the debug or listening | |
## of PHPStorm so, you can omite it securely. | |
## | |
## The second variable XDEBUG_CONFIG must be have the same value that its equivalent value in *-xdebug.ini. | |
## | |
## Set the remote ip in *-xdebug.ini is also required. | |
env PHP_IDE_CONFIG="serverName=vagrant" XDEBUG_CONFIG="idekey=vagrant" php shell/indexer.php |
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
/** | |
Recommended InnoDB Buffer Pool Size (RIBPS) with additional 60% (1.6 rate). The result's units is giga bytes. | |
Source: https://dba.stackexchange.com/questions/27328/how-large-should-be-mysql-innodb-buffer-pool-size | |
*/ | |
SELECT CEILING(Total_InnoDB_Bytes*1.6/POWER(1024,3)) RIBPS FROM | |
(SELECT SUM(data_length+index_length) Total_InnoDB_Bytes | |
FROM information_schema.tables WHERE engine='InnoDB') A; |
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 | |
2, | |
`cg`.`customer_group_id`, | |
`p`.`entity_id`, | |
189796, | |
1484006400, | |
1514764799, | |
'by_percent', | |
50, | |
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
## _reindexNonAnchorCategories | |
## This method is not the problem | |
## | |
## Results | |
## Range self::RANGE_CATEGORY_STEP = 500 | |
## Take the entities which id is between 500*n 500*(n+1) | |
## Benchmark completed 4m 21s 77ms X 32 queries = 2h 19m 12s = 2h | |
INSERT IGNORE INTO `catalog_category_product_index_tmp` (`category_id`, `product_id`, `position`, `is_parent`, `store_id`, `visibility`) | |
SELECT | |
`cc`.`entity_id` AS `category_id`, |
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
## _reindexNonAnchorCategories | |
## This method is not the problem | |
## | |
## Results | |
## Range self::RANGE_CATEGORY_STEP = 500 | |
## Take the entities which id is between 500*n 500*(n+1) | |
## Benchmark 13687 rows affected in 3s 942ms X 32 queries ~ 96s | |
INSERT INTO `catalog_category_product_index_tmp` (`category_id`, `product_id`, `position`, `is_parent`, `store_id`, `visibility`) | |
SELECT | |
`cc`.`entity_id` AS `category_id`, |
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
## Tested with python Python 2.7.12 | |
# Instructions | |
# | |
# 1. Put the fasta file in the same directory of this file with the name | |
# blast.fasta. | |
# 2. Run the script with the origin file name and the destination file name | |
# | |
# Example: python clean_blast.py file1.fasta my_file.fasta |
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
#!/usr/bin/php | |
<?php | |
/** | |
* .git/hooks/pre-commit | |
* | |
* This pre-commit hooks will check for PHP error (lint), and make sure the code | |
* is PSR compliant. | |
* | |
* Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer) | |
* |
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
/* | |
* Widget 1.0 | |
* Author: Wender Lima | |
*/ | |
!function(e,l,id,s,r,d){ | |
var c=null, | |
v=null, | |
jQ=null, | |
h=e.getElementsByTagName('head')[0], | |
w=e.getElementById(id); |
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
packages : | |
- jshint # requires the nodejs package with the same name. | |
- SideBarEnhancement | |
- TrailingSpaces | |
- DocBlockr | |
- SublimeLinter | |
- SublimeLinter-jshint | |
- Emmet |
NewerOlder