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 | |
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> |
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
<div n:class="tab-pane, $tab == 'content' ? active" id="component-{$id}-{$tab}"> | |
{snippet tab} | |
{include #content} | |
{/snippet} | |
</div> |
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 | |
$config = __DIR__ . '/config/config.neon'; | |
$configurator->addConfig($config, FALSE); | |
foreach (Nette\Utils\Arrays::get(Nette\Utils\Neon::decode( | |
file_get_contents($config) | |
) ?: array(), 'extensions', array()) as $name => $class) { | |
$configurator->onCompile[] = function ($configurator, $compiler) use ($name, $class) { | |
$compiler->addExtension($name, new $class); |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset=utf-8> | |
<style> | |
body { width: 100%; margin: 0; padding: 20xp; height: 100%; position: relative; } | |
div { | |
color: #555555; | |
cursor: text; | |
display: block; |
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 | |
namespace VojtechDobes\NetteSecurity; | |
use Nette\InvalidArgumentException; | |
use Nette\Security\IAuthenticator; | |
use Nette\Security\IIdentity; | |
/** |
NewerOlder