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
" can haz highlights | |
syntax enable | |
" make love to my eyes | |
colorscheme Tomorrow-Night | |
" always show tabs | |
set showtabline=2 | |
" enable recursive file search |
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 | |
# PHP CodeSniffer pre-receive hook for git | |
PHPCS_BIN="/usr/bin/phpcs" | |
PHPCS_CODING_STANDARD="PEAR" | |
# use coding standart dir from local repo | |
PHPCS_DIR_LOCAL=0 | |
TMP_DIR=$(mktemp -d --tmpdir phpcs-pre-receive-hook.XXXXXXXX) | |
mkdir "$TMP_DIR/source" |
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 | |
$result = Mage::getModel('customer/customer')->getCollection() | |
->join(array('pet' => $this->getTable('partners_earn_transactions')), $this->getTable('customer_entity').'.entity_id = `pet`.customer_id') // Этот метод точно есть в Collection классе? Может нужно взять getCollection()->getSelect() перед тем как колать join? | |
->addExpressionFieldToSelect('transaction_count', 'COUNT({{pet.id}})') | |
->addAttributeToFilter('country_id', $country_code) | |
->addFieldToFilter('is_active', 1) | |
->addAttributeToSort('COUNT({{pet.id}})') | |
->addAttributeToSort('SUM({{pet.points}})') | |
->groupByAttribute($this->getTable('customer_entity').'.entity_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
#!/bin/bash | |
################################################## Basic | |
# this is comment | |
########### variable (quoting a variable preserves whitequotes) | |
# USERNAME='lzyy' | |
# |