- Есть одна система, а не набор систем.
- Желаемое состояние системы должно иметь численное выражение.
- Это “численное выражение” должно быть машинно измеримым.
- Текущее состояние системы должно само исправляться до желаемого состояния.
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 | |
if [[ "$DB_NAME" == "" ]]; then | |
echo "Error: DB_NAME is not set" | |
exit 1 | |
fi | |
if [[ "$DB_PASSWORD" == "" ]]; then | |
echo "Error: DB_PASSWORD is not set" | |
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 | |
$q[] = <<<SQL | |
DROP TABLE IF EXISTS interests; | |
DROP TABLE IF EXISTS users; | |
SQL; | |
$q[] = <<<SQL | |
CREATE TABLE users ( | |
id BIGSERIAL, |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="test-service-namespace"> | |
<SOAP-ENV:Body> | |
<ns1:TestOperation> | |
<ns1:firstArgument> | |
<!-- Wrong enum --> | |
<ns1:timeGroup>FooBar</ns1:timeGroup> | |
<!-- Good enum --> | |
<ns1:customerType>CHILD</ns1:customerType> | |
</ns1:firstArgument> |
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 | |
/** | |
* Adding this class to the classmap of SoapClient causes segmentation fault | |
* Not mentioned in the classmap it works fine, being (automaticly) converted to string. | |
*/ | |
class SortOrderEnum | |
{ | |
const CHOICE_ASCENDING = 'ASCENDING'; | |
const CHOICE_DESCENDING = 'DESCENDING'; |
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 | |
$naseUrl = 'http://vk.com/'; | |
$apiDocUrl = 'http://vk.com/developers.php?o=-1&p=Ads_API'; | |
$apiDoc = file_get_contents($apiDocUrl); | |
$apiDoc = iconv('windows-1251', 'utf-8', $apiDoc); | |
preg_match_all( | |
"~\<div class=\"wk_sub_header\"\>(?P<doc>.*?)\<\/div\>\s*\<ul class=\"listing\"\>(?P<methods>[\s\S]*?)\<\/ul\>~", |
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 | |
// Этот пример демонстрирует понятие "цепочки исключений" | |
// Показывает сохранение стэка вызовов (stack trace) при оборачивании исключений | |
function a() | |
{ | |
try { | |
b(); |
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 | |
/** | |
* Событие с полезной нагрузкой | |
* | |
* PHP 5.3 | |
* | |
* Это докблок файла. | |
* Если бы этого блока не было, phpDocumentor был бы недоволен. | |
* Здесь могла быть упомянута лицензия MIT. | |
* |
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
build/ | |
*.box | |
*.iso |
OlderNewer