- Enable the tracer on your xdebug.ini file (see the
xdebug.inifile). - If you are gonna trace an http request, make sure your
xdebug.trace_output_diris writable by the webserver user (www-data). - Execute your script or your request. You can use
produce_segmentation.phpto test. - See the trace file(s) on your
xdebug.trace_output_dir.
| 'use strict'; | |
| var EventEmitter = require('events').EventEmitter; | |
| var httpMocks = require('node-mocks-http'); | |
| module.exports = { | |
| createRequest: httpMocks.createRequest.bind(httpMocks), | |
| createResponse: function (opts) { | |
| opts = opts || {}; | |
| opts.eventEmitter = EventEmitter; |
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.
| #!/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 | |
| // 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 |
I like the idea of unifying navigation between tmux panes and vim
windows. @mislav did a great job in [this gist][mislav-gist] but it depends on
using C-{h,j,k,l} for navigation instead of vim's default C-W {h,j,k,l}.
Tmux's bind-key doesn't support multiple keys: just a single key with a
modifier, so if we want to keep using C-w we have to be a bit tricky.
This approach binds C-w to set up keybindings that a) navigate and b) unset
themselves. It turns out you can't have a bind-key statement in your
.tmux.conf that's too long or tmux will segfault, which is one of the
| /* This shows how to use Object.create */ | |
| /** BASE MODEL **********************************/ | |
| function BaseModel(collection) { | |
| this.collection = collection; | |
| } | |
| BaseModel.prototype.getCollection = function() { | |
| return this.collection; |
| <?php | |
| /** | |
| * Simple Magento integration test PHPUnit bootstrap | |
| */ | |
| chdir(__DIR__ . '/../..'); | |
| $mageFile = 'htdocs/app/Mage.php'; | |
| umask(0); |
Talked with @anthonybouch and @scomma the other day and told them that I don't do source-deploys with Go programs. It was sort of a gut reaction and also because I havn't quite worked out all the details at that time as I was not at the stage to be thinking about deployments just yet.
@scomma made note that you could still do git deploys with source and compile on the server and that's right that you can do that but there are some complications: