- version 3.6
Check those constraints:
$this->anything()
| var runner = require('child_process'); | |
| runner.exec( | |
| 'php -r \'include("settings.php"); print json_encode($databases);\'', | |
| function (err, stdout, stderr) { | |
| var connection = JSON.parse(stdout).default.default; | |
| console.log(connection.database); | |
| // result botdb | |
| } |
| #!/usr/bin/env python | |
| # Adapted from Mark Mandel's implementation | |
| # https://github.com/ansible/ansible/blob/devel/plugins/inventory/vagrant.py | |
| import argparse | |
| import json | |
| import paramiko | |
| import subprocess | |
| import sys | |
| #!/bin/sh | |
| # ------------------------------------------------------------------------------ | |
| # SOME INFOS : fairly standard (debian) init script. | |
| # Note that node doesn't create a PID file (hence --make-pidfile) | |
| # has to be run in the background (hence --background) | |
| # and NOT as root (hence --chuid) | |
| # | |
| # MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
| # INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
| # INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
| // This script will boot app.js with the number of workers | |
| // specified in WORKER_COUNT. | |
| // | |
| // The master will respond to SIGHUP, which will trigger | |
| // restarting all the workers and reloading the app. | |
| var cluster = require('cluster'); | |
| var workerCount = process.env.WORKER_COUNT || 2; | |
| // Defines what each worker needs to run |
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');Those suck for maintenance and they're ugly.
download and install Solr from http://lucene.apache.org/solr/.
you can access Solr admin from your browser: http://localhost:8983/solr/
use the port number used in installation.
xdebug.ini file).xdebug.trace_output_dir is writable by the webserver user (www-data).produce_segmentation.php to test.xdebug.trace_output_dir.| SELECT | |
| -- Attributes in the pivot table: | |
| -- `p`.`whatever` AS `whatever` | |
| p.entity_id AS id, | |
| p.sku AS sku, | |
| -- Attributes in the EAV tables: | |
| -- IFNULL(`store_whatever`.`value`, `default_whatever`) AS `whatever` | |