Skip to content

Instantly share code, notes, and snippets.

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
<?php
/**
* ProcessWire PagesToJSON Module
*
* Adds the ability to output a PageArray as JSON
* Original code from RC here: http://processwire.com/talk/topic/1417-export-array-to-json-format/
* Don't for get to add header("Content-type: application/json"); to pages that output JSON only
*
* ProcessWire 2.x