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 | |
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
#!/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 | |
/** | |
* 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
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
/** | |
* 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
<?php | |
use Nette\Application\UI; | |
use Nette\Reflection\Method; | |
class BasePresenter extends UI\Presenter | |
{ | |
/** @var array datasets for Multipliers */ |
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 | |
/** | |
* This file is part of the Nette Framework (http://nette.org) | |
* | |
* Copyright (c) 2004, 2011 David Grudl (http://davidgrudl.com) | |
* | |
* For the full copyright and license information, please view | |
* the file license.txt that was distributed with this source code. | |
*/ |
Zde se hodí dát do .gitignore main.neon
(abych mohl kdykoliv svoje údaje přepsat a nestrašilo mi to v gitu), ale zase musím na začátku pamatovat, že si do tohoto main.neon
musím dát klauzuli include
.
credentials.neon
obsahuje opravdu jen to nejnutnější (tedy změněné údaje), není pro mě problém si ho hodit do .gitignore a při rozjíždění projektu si ho vytvořit (nemusím si pamatovat kromě jeho vytvoření nic jiného).
Přepsání služby v main.neon
je zde ovšem zbytečné, protože ve skutečnosti je původní a bude přepsáno definicí z services.neon
(která je ale opticky dříve).