var load = requirejs('bootstrap')('nameOfTestedThing', {
nameOfDependency: mockOfDependency
}, function (test) {
describe('foo', function () {
test('bar', function (testedThing, mockOfDependency) {
...
test.done();
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
<?php | |
trait Decorator | |
{ | |
/** @var object */ | |
private $decorated; | |
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
[].slice.call(document.querySelectorAll('pre'), 0).forEach(function (el) { | |
el.innerHTML = el.innerHTML.split("\n").join('<br>'); | |
}); | |
var style = document.createElement("style"); | |
style.appendChild(document.createTextNode("")); | |
document.head.appendChild(style); | |
style.sheet.insertRule("pre { white-space: normal }", 0); |
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
<?php | |
// $selection instanceof DibiFluent | |
$filter = FilterHelper::start($selection, $filter) | |
->add('start_date')->setRule('[b.start_date] >= %d') | |
->add('end_date')->setRule('[b.end_date] <= %d') | |
->end(); |
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
<?php | |
class CredentialsAuthenticator | |
{ | |
/** @var Nette\Security\User */ | |
private $user; | |
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
<?php | |
function stop($step = 1) { | |
static $i = 0; | |
$i++; | |
if ($i >= $step) { | |
$stop(); | |
} | |
} |
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
$.nette.init(function (rh) { | |
$(this.linkSelector).off('click.nette', rh).on('click.nette', rh); | |
$(this.formSelector).off('submit.nette', rh).on('submit.nette', rh); | |
$(this.buttonSelector).off('click.nette', rh).on('click.nette', rh); | |
}, { | |
linkSelector: 'a.ajax', | |
formSelector: 'form.ajax', | |
buttonSelector: 'input.ajax[type="submit"], button.ajax[type="submit"], input.ajax[type="image"]' | |
}); |
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
dscacheutil -flushcache |
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
<exec executable="bash" failonerror="true"> | |
<arg value="-c" /> | |
<arg value="curl -s https://getcomposer.org/installer | php" /> | |
</exec> | |
<exec executable="php" failonerror="true"> | |
<arg value="composer.phar" /> | |
<arg value="install" /> | |
</exec> |
NewerOlder