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 | |
for SUBDIR in $(ls -d -- */) | |
do | |
cd $SUBDIR | |
echo -ne "." | |
CMD="git log --all --grep='$1' 2>/dev/null" | |
RESULT=$(eval $CMD) | |
if [[ "$RESULT" != "" ]] |
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 AcmeDemoExtension extends \Twig_Extension { | |
public function getFunctions() { | |
return [ | |
'dump_array' => new \Twig_Function_Method($this, 'dumpArray'), | |
]; | |
} | |
public function dumpArray($arrayLikeObject, $indentLevel = 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 | |
header('content-type: text/html; charset=utf-8'); | |
$pattern = isset($_POST['pattern']) ? $_POST['pattern'] : '~^$~'; | |
$subject = isset($_POST['subject']) ? $_POST['subject']: ''; | |
?> | |
<h1>Preg_match tester</h1> | |
<form method="post"> |
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 | |
/** | |
* Homepage presenter. | |
*/ | |
class HomepagePresenter extends BasePresenter | |
{ | |
private $a, $b, $c; |
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
x@ACER2 /d (master) | |
$ /c/xampp/apache/bin/ab -n 1000 http://localhost:8080/ | |
This is ApacheBench, Version 2.3 <$Revision: 1638069 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking localhost (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests |
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 VS\UI; | |
/** | |
* Simple form generator for plain old data objects. | |
* | |
* Creates a field for each scalar setter. Nothing more. | |
* | |
* @author Václav Šír |
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 | |
header('Content-type: text/html; charset=utf-8'); | |
?> | |
<title>De-Quote</title> | |
<form method="post"> | |
<textarea name="input" cols="80" rows="10"><?php echo htmlspecialchars(@$_POST['input']); ?></textarea><br> | |
<textarea name="output" cols="80" rows="10"><?php | |
if (isset($_POST['input'])) { | |
echo htmlspecialchars( |
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
$ ab -n 2000 -c 10 http://localhost/framework-bench/helloworld/codeigniter/index.php/say/hello | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking localhost (be patient) | |
Completed 200 requests | |
Completed 400 requests | |
Completed 600 requests | |
Completed 800 requests |
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
{assertVariables | |
number => float, | |
message => string, | |
property => 'Hell\Model\Property', | |
identity => 'Nette\Security\IIdentity', | |
arrayOrIterator => 'Model\Item[]', | |
optionalParameter => 'SomeType|NULL' | |
anyType => mixed, | |
anyTypeOrNull => 'mixed|NULL', | |
anyArrayOrIterator => 'mixed[]' |
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 Articles; | |
use Nette\Application\UI\Presenter; | |
abstract class BasePresenter extends Presenter | |
{ | |
public function formatTemplateFiles() |
OlderNewer