var load = requirejs('bootstrap')('nameOfTestedThing', {
nameOfDependency: mockOfDependency
}, function (test) {
describe('foo', function () {
test('bar', function (testedThing, mockOfDependency) {
...
test.done();
View Decorator.php
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; | |
View format-pre.js
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); |
View Example.php
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(); |
View CredentialsAuthenticator.php
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; | |
View debug.php
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(); | |
} | |
} |
View main.js
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"]' | |
}); |
View Usage.md
View gist:3775104
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 |
View build.xml
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