#Some discussions on logging from docker: Using logstash Using Papertrail
A lot of this boils down to whether you want a single or multi-process (systemd, supervisord etc.) container...
#Some discussions on logging from docker: Using logstash Using Papertrail
A lot of this boils down to whether you want a single or multi-process (systemd, supervisord etc.) container...
<?php | |
namespace console\controllers\behaviors; | |
use Yii; | |
use yii\base\ActionEvent; | |
use yii\base\Behavior; | |
use yii\base\Exception; | |
use yii\console\Controller; |
<?php | |
/** | |
* @param string $string Subject | |
* @param int $length Max string length | |
* @param bool $exactLength Truncate string with exact $length | |
* @param string $append Ellipsis string | |
* @return string | |
*/ | |
class TruncateString |
<?php | |
use yii\base\Object; | |
use yii\helpers\Console; | |
/** | |
* Usage: | |
* $consoleProgress = new ConsoleProgress(['max' => 365]); | |
* $consoleProgress->start(); | |
* foreach($days in $day) { |
--- | |
# This has been tested with ansible 1.3 with these commands: | |
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false" | |
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true" | |
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts" | |
# NB: The type of the variable is crucial! | |
- name: Ansible Conditionals Examples | |
hosts: $hosts | |
vars_files: |
[unix_http_server] | |
file=/tmp/supervisor.sock ; path to your socket file | |
[supervisord] | |
logfile=/var/log/supervisord/supervisord.log ; supervisord log file | |
logfile_maxbytes=50MB ; maximum size of logfile before rotation | |
logfile_backups=10 ; number of backed up logfiles | |
loglevel=error ; info, debug, warn, trace | |
pidfile=/var/run/supervisord.pid ; pidfile location | |
nodaemon=false ; run supervisord as a daemon |
// Определяем зависимости в переменных | |
var gulp = require('gulp'), | |
cache = require('gulp-cache'), | |
clean = require('gulp-clean'), | |
stream = require('event-stream'), | |
size = require('gulp-size'), | |
jshint = require('gulp-jshint'), | |
concat = require('gulp-concat'), | |
uglify = require('gulp-uglify'), | |
minifyCSS = require('gulp-minify-css'), |
<?php | |
// http://www.cplusplus.com/reference/queue/queue/ | |
class Queue { | |
private $_queue = array(); | |
public function size() { | |
return count($this->_queue); | |
} |
<?php | |
// http://www.cplusplus.com/reference/stack/stack/ | |
class Stack { | |
private $_stack = array(); | |
public function size() { | |
return count($this->_stack); | |
} |