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
class Something { | |
public function doSomthing(Lead $lead){ | |
//code here | |
} | |
} |
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
$lead_all = LeadTable::getInstance()->createQuery('l')->leftJoin('l.ToDoItems tdi')->where('l.id = ?', 7)->fetchOne(); | |
echo count($lead_all->getToDoItems()); //prints 4 | |
$NOT_LEAD_ALL = LeadTable::getInstance()->createQuery('l')->leftJoin('l.ToDoItems tdi')->where('l.id = ?', 7)->addWhere('tdi.close_date IS NOT NULL')->fetchOne(); | |
echo count($lead_all->getToDoItems()); //prints 1 instead of 4 like above |
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 | |
public function save(Doctrine_Connection $conn = null) { | |
$conn = $conn ? $conn : $this->getTable()->getConnection(); | |
$conn->beginTransaction(); | |
try { | |
$ret = parent::save($conn); | |
$this->updateLuceneIndex(); | |
$conn->commit(); |
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
#/etc/init/logstash.conf | |
description "logstash collector server" | |
#start on runlevel [5] | |
#stop on runlevel [!5] | |
# tell upstart we're creating a daemon | |
# upstart manages PID creation for you. | |
expect fork | |
respawn |
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 | |
class FeatureContext extends MinkContext { | |
/** | |
* Take screenshot when step fails. Works only with Selenium2Driver. | |
* Screenshot is saved at [Date]/[Feature]/[Scenario]/[Step].jpg | |
* | |
* @AfterStep | |
*/ |
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
jQuery(document).ready(function() { | |
$("ul.collection").each(function(index, collection){ | |
var prototype = $(collection).find(".item.prototype").remove().removeClass('hidden'); | |
$(collection).data('prototype', prototype.prop('outerHTML')); | |
}); | |
$("body").on('click', "ul.collection .add", function(e){ | |
e.preventDefault(); | |
var collection = $(this).parents("ul.collection"); |
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
[alias] | |
co = checkout | |
ec = config --global -e | |
up = !git pull --rebase --prune $@ && git submodule update --init --recursive | |
cob = checkout -b | |
cm = !git add -A && git commit -m | |
save = !git add -A && git commit -m 'SAVEPOINT' | |
wip = !git add -u && git commit -m "WIP" | |
undo = reset HEAD~1 --mixed | |
amend = commit -a --amend |
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
n=0 | |
until [ $n -ge 5 ] || ./symfony syn:cams-import --force --quiet; do | |
echo Tansfer disrupted, retrying... | |
n=$[$n+1] | |
sleep 120 | |
done | |
if [ $? -eq 0 ] | |
then | |
echo Command completed successfully |
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
Actually, you don't need to do that. GitHub provides a special pulls remote "namespace" on the upstream repo, so you can add it as a fetch pattern to your .git/config like so: | |
[remote "upstream"] | |
url = https://github.com/neovim/neovim.git | |
fetch = +refs/heads/*:refs/remotes/upstream/* | |
fetch = +refs/pull/*/head:refs/pull/upstream/* | |
Then when you `git fetch --all`, you will have ALL pull requests available in your local repo in the local pull/ namespace. To check out PR #42: | |
git checkout -b foo refs/pull/upstream/42 |
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
html { transition: transform 1s ease-out; } | |
html:hover { transform: rotate(360deg); } | |
html { transform: scaleX(-1); } |
OlderNewer