This file contains 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
/** | |
* Add clauses for date values chosen to select | |
* | |
* @param Zend_Db_Select $oSelect | |
* @param integer $day | |
* @param integer $month | |
* @param integer $year | |
* | |
* @return Zend_Db_Select | |
*/ |
This file contains 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 to select particpants by their particiation | |
* | |
* @param integer $statusId Status id of partipation | |
* @param integer $value Value for query | |
* @param string $operator Operator for claus opions: moreThan, lessThan, atLeast, equals | |
* | |
* @return array | |
*/ | |
public function selectUsersByParticipation($statusId, $value, $operator) |
This file contains 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 parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
NO_COLOR="\[\033[0m\]" | |
PS1="$GREEN\u@\h$NO_COLOR:\w$YELLOW\$(parse_git_branch)$NO_COLOR\$ " |
This file contains 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
// I want to modify the DQL include the 'index by' | |
// Reason: Often I find the indexBy function in the query builder frustrating | |
$qb = $qb->getQuery()->setDQL( | |
str_replace( | |
'WHERE', | |
'INDEX BY s.id WHERE', $qb->getDQL() | |
) | |
); |
This file contains 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 | |
cd /var/www/ | |
PROJECT_DIR_NAME="DiTest" | |
TIME="`date +%Y%m%d%H%M%S`" | |
# save copy of old file somewhere | |
cp -R $PROJECT_DIR_NAME backups/$PROJECT_DIR_NAME-$TIME |
This file contains 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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Added to stop us serving content to internal dummy connections | |
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC] | |
RewriteRule .* - [F,L] | |
#End of added | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f |
This file contains 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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Added to stop us serving content to internal dummy connections | |
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC] | |
RewriteRule .* - [F,L] | |
#End of added | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f |