This file contains hidden or 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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("circleci.com") { | |
.app-dominant { | |
background: #FFF; | |
} | |
.card { | |
border: 2px solid #ccc; | |
border-radius: 4px; | |
} |
This file contains hidden or 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
# init & renew | |
# replace ikw.cz with domain AND admin with vesta user | |
letsencrypt certonly \ | |
--authenticator webroot \ | |
--renew-by-default \ | |
--agree-tos \ | |
--webroot-path /home/admin/web/ikw.cz/public_html \ | |
--domains ikw.cz,www.ikw.cz |
This file contains hidden or 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
- Aws\Sdk({ | |
credentials: { | |
key: %s3.key%, | |
secret: %s3.secret%, | |
}, | |
version: latest, | |
region: 'eu-west-1', | |
http_handler: @Aws\Handler\GuzzleV6\GuzzleHandler, | |
}) | |
- Aws\Handler\GuzzleV6\GuzzleHandler |
This file contains hidden or 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 Nextras\Orm\Collection\ICollection; | |
use Nextras\Orm\Entity\IEntity; | |
use Nextras\Orm\Mapper\Dbal\Mapper; | |
use Nextras\Orm\Mapper\Dbal\DbalCollection; | |
class BaseMapper extends Mapper | |
{ |
This file contains hidden or 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 Article extends Base { | |
function getUploadDir() { | |
# e.g. something like this | |
return "upload/articles/article-$this[id]"; | |
} | |
} |
This file contains hidden or 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
{ | |
"methodCalls": [ | |
{ | |
"class": "\\Mockery", | |
"method": "mock", | |
"position": 0, | |
"mask": "%s|\\Mockery\\MockInterface" | |
}, | |
{ | |
"class": "\\Nette\\DI\\Container", |
This file contains hidden or 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
AFTER: | |
----- | |
NDB 2.0 | Time: 5.079 s | Memory: 16.7 MB | PHP: 5.5.20-1~dotdeb.1 | Nette: 2.0.18 | |
NDB 2.1 | Time: 0.984 s | Memory: 16.5 MB | PHP: 5.5.20-1~dotdeb.1 | Nette: 2.1.8 | |
NDB 2.2 | Time: 1.049 s | Memory: 16.1 MB | PHP: 5.5.20-1~dotdeb.1 | Nette: 2.2.x | |
Nextras\Orm | Time: 0.800 s | Memory: 21.1 MB | PHP: 5.5.20-1~dotdeb.1 | |
NotOrm | Time: 1.418 s | Memory: 7.2 MB | PHP: 5.5.20-1~dotdeb.1 | |
LeanMapper | Time: 0.754 s | Memory: 15.6 MB | PHP: 5.5.20-1~dotdeb.1 | |
Doctrine2 | Time: 52.118 s | Memory: 28.0 MB | PHP: 5.5.20-1~dotdeb.1 | Doctrine: 2.4.2 |
This file contains hidden or 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 foo | |
{ | |
private $name; | |
public function greet2() | |
{ | |
$this->greet('jan'); | |
echo $this->name; | |
} |
This file contains hidden or 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
select * | |
from authors | |
where not exists ( | |
select * | |
from books | |
left join books_x_tags on (books_x_tags.book_id = books.id) | |
left join tags on (tags.id = books_x_tags.tag_id) | |
where | |
books.author_id = authors.id | |
and tags.name = 'PHP' |
This file contains hidden or 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 80; | |
server_name example.com; | |
root d:/webs/example.com/www; | |
index index.php index.html; | |
try_files $uri $uri/ /index.php?$args; | |
location ~ \.phpt?$ { | |
try_files $uri @missing; |