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
/** | |
* Common AJAX setup | |
*/ | |
var snippetsExt = $.nette.ext('snippets'); | |
snippetsExt.context.applySnippet = function ($el, html) { | |
$el.fadeTo("fast", 0.3, function () { | |
$el.html(html).fadeTo("fast", 1); | |
}); | |
}; |
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
wmic path win32_process Where "CommandLine Like '%selenium-server.jar%'" Call Terminate |
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 | |
/** | |
* Fluent Strings Helper for Nette Framework | |
* | |
* @author Vojtěch Dobeš <me@vojtechdobes.com> | |
* @license WTFPL | |
*/ | |
class StringObject | |
{ |
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 | |
current_branch="$(git symbolic-ref HEAD 2>/dev/null)" || current_branch="(unknown)" | |
current_branch=${current_branch##refs/heads/} | |
if [[ $current_branch = "(unknown)" ]] | |
then | |
echo "Unable to determine current branch!" | |
exit 1 | |
fi |
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 | |
use Nette\Application\UI; | |
class Form extends UI\Control | |
{ | |
protected function createComponentForm() | |
{ | |
$form = new UI\Form; |
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
var timeout = 60; | |
var pause = 5; | |
var active = false; | |
function getLastLogin() { | |
var cookies = document.cookie.split(";"); | |
for (i in cookies){ | |
var cookie = cookies[i].split("="); | |
if ($.trim(cookie[0]) == 'lastLogin') return cookie[1]; | |
} |
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; | |
/** |
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 | |
$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); |