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
oxy.layout.right({}, function() { | |
out.printHtml('\n <div class="watchDogBox">\n '); | |
if (accountName != null) { | |
out.printHtml('\n <div class="popup_watcherNews">\n <a href="#" class="wd">Hlídací pes pro novinky v kategorii</a>\n '); | |
oxy.popup.insert({categoryId:( currentCategory.id),name:"watcherNews",expirationOptions:( expirationOptions)}); | |
out.printHtml('\n </div>\n '); | |
} else { | |
... | |
} | |
} |
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 DICProxy | |
{ | |
public function __construct($dic, $className) { | |
//set to private members | |
} | |
public function __call($method, $args) | |
{ | |
return $dic->giveMe($className)->$method($args); //super-simplified |
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
app.views.Viewport = Ext.extend(Ext.Panel, { | |
initComponent: function() { | |
//put instances of cards into app.views namespace | |
Ext.apply(app.views, { | |
question : new app.views.Question(), | |
articlesList : new app.views.ArticlesList(), | |
articlesDetail: new app.views.ArticlesDetail() | |
/*videos : new app.views.Videos(), | |
events : new app.views.Events(), | |
tags : new app.views.Tags(), |
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 Crud_Filter_ValueProcessor_Text extends Crud_Filter_ValueProcessor_Abstract | |
{ | |
public function isValidFormat($value) | |
{ | |
return true; | |
} | |
public function process($column, $value) { | |
if ($column->isExactMatch()) { |
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\Utils\Json; | |
/** | |
* Minimalistic Google OAuth2 connector | |
* @author Mikuláš Dítě | |
* @license BSD-3 | |
*/ | |
class Google extends Nette\Object |
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
text = "Were you born 1. 3. 1987 in Prague? Štěpán Jr. lives there for 3 years now! " | |
expectedResult = "Were you born 1. 3. 1987 in Prague?" | |
trimText(input = text, characterLimit = 50) == expectedResult |
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 | |
rm -f ./mux.sql; | |
rm -f ./tmp.list; | |
RES=`echo ""` | |
ITEM=`echo ""` | |
for file in `git ls-files` | |
do | |
HASH=`git rev-list HEAD $file | tail -n 1` | |
DATE=`git show -s --format="%ct" $HASH --` | |
ITEM=$(printf "%s %s\n" $DATE $file >> tmp.list) |
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 | |
/** | |
* Clear all assigned variables | |
* | |
* Clears all variables assigned to Zend_View either via {@link assign()} or | |
* property overloading ({@link __set()}). | |
* | |
* @return void | |
*/ | |
public function clearVars() |
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 | |
# Interactive PoPToP install script for an OpenVZ VPS | |
# Tested on Debian 5, 6, and Ubuntu 11.04 | |
# April 2, 2013 v1.11 | |
# Author: Commander Waffles | |
# http://www.putdispenserhere.com/pptp-debian-ubuntu-openvz-setup-script/ | |
echo "######################################################" | |
echo "Interactive PoPToP Install Script for an OpenVZ VPS" | |
echo |
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
# last job | |
sudo salt-run jobs.list_jobs | tac | grep -P ^'.*':$ -m 1 -B 9999 | tac |
OlderNewer