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
vagrant@localhost ~]$ sudo yum install gearmand -y | |
Loaded plugins: fastestmirror | |
Setting up Install Process | |
Loading mirror speeds from cached hostfile | |
* base: centos.mirror.netelligent.ca | |
* extras: centos.mirror.netelligent.ca | |
* updates: centos.westmancom.com | |
No package gearmand available. | |
Error: Nothing to do | |
[vagrant@localhost ~]$ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm |
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
" | |
" MAIN CUSTOMIZATION FILE | |
" | |
set nocompatible | |
filetype off | |
call pathogen#infect() | |
syntax on | |
filetype plugin indent on |
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 ruleset | |
<?xml version="1.0"?> | |
<ruleset name="Namespacing Check" | |
xmlns="http://pmd.sf.net/ruleset/1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 | |
http://pmd.sf.net/ruleset_xml_schema.xsd" | |
xsi:noNamespaceSchemaLocation=" | |
http://pmd.sf.net/ruleset_xml_schema.xsd"> | |
<description> |
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
class NamespaceChecker extends AbstractRule implements MethodAware | |
{ | |
public function apply(\PHPMD\AbstractNode $node) | |
{ | |
$whitelist = array('self', 'parent', 'static'); | |
foreach ($node->findChildrenOfType('ClassOrInterfaceReference') as $child) { | |
if (!in_array($child->getName(), $whitelist)) { | |
try { | |
$reflector = new ReflectionClass($child->getName()); | |
} catch (Exception $e) { |
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 | |
require 'vendor/autoload.php'; | |
use PHPMD\AbstractNode; | |
use PHPMD\AbstractRule; | |
use PHPMD\Rule\MethodAware; | |
class NamespaceChecker extends AbstractRule implements MethodAware | |
{ | |
public function apply(\PHPMD\AbstractNode $node) |
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
" | |
" MAIN CUSTOMIZATION FILE | |
" | |
set nocompatible | |
filetype off | |
call pathogen#infect() | |
Helptags | |
syntax on | |
filetype plugin indent on |
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
I use these bundles plus Pathogen | |
~/.vim/bundle ᐅ ls -l | |
total 0 | |
drwxr-xr-x@ 6 chartjes staff 204 8 Dec 14:06 Greplace.vim | |
drwxr-xr-x@ 9 chartjes staff 306 9 Dec 13:05 ack.vim | |
drwxr-xr-x@ 5 chartjes staff 170 1 May 2013 closetag.vim | |
drwxr-xr-x@ 8 chartjes staff 272 8 Dec 14:07 ctrlp.vim |
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
" | |
" MAIN CUSTOMIZATION FILE | |
" | |
set nocompatible | |
filetype off | |
call pathogen#infect() | |
Helptags | |
syntax on | |
filetype plugin indent on |
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
find . -iname "*.php" -exec php -l {} \; | grep -i "Errors.parsing" | |
BUT | |
I only want to get something like | |
./foo/bar/biz.php | |
as the output |
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
$router->addRoute('sending-drip-campaigns', new \Zend_Controller_Router_Route('sending/drip-campaigns/:action/*', array('module' => 'sending' , 'controller' => 'drip-campaigns','action' => 'index'))); | |
// turn into | |
$router->addRoute( | |
'sending-drip-campaigns', | |
new \Zend_Controller_Router_Route( | |
'sending/drip-campaigns/:action/*', | |
array( | |
'module' => 'sending', | |
'controller' -> 'drip-campaigns', |