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 | |
declare(strict_types=1); | |
// Updates all the version constraints of dependencies in the composer.json file to their latest version. | |
// | |
// usage: composer-frontline.php (updates all Nette packages) | |
// composer-frontline.php doctrine/* (updates all Doctrine packages) | |
// composer-frontline.php * (updates all packages) |
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 | |
# In-place apply the CVE-2020-15227 nette/application patch | |
# This is a universal patcher for all affected versions. | |
# Run with `php patch-CVE-2020-15227.php` | |
# Inspiration: @spazef0rze | |
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 | |
declare(strict_types=1); | |
require '/nette.phar'; | |
class TypeHints | |
{ | |
public $ignoredTypes = ['mixed', 'resource']; |
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 (https://nette.org) | |
* Copyright (c) 2004 David Grudl (https://davidgrudl.com) | |
*/ | |
namespace Nette; | |
use Nette\Utils\ObjectHelpers; |
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 | |
// composing presenters without inheritance | |
// (requires nette/application 2.4.11) | |
trait RequireLoggedUser | |
{ | |
public function injectRequireLoggedUser() | |
{ |
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 | |
// transfer of a persistent parameter between two presenters without an inheritance | |
// (requires nette/application 3.0.0) | |
trait LangParameter | |
{ | |
/** @persistent */ | |
public $lang; |
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 | |
declare(strict_types=1); | |
require '/nette.phar'; | |
class TypeHints | |
{ | |
public $php71 = true; |
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> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<div style="width: 300px; height: 300px; background: blue"></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
server { | |
... | |
listen 443 ssl; | |
listen 80; | |
if ($server_port = 80) { | |
set $xp A; | |
} |
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 App\Presenters; | |
use Nette; | |
use App\Model; | |
class HomepagePresenter extends BasePresenter | |
{ |