Monday, September 16, 2013
PHP Array flatten
Here's a handy way to convert a multi-dimensional array into a single-dimensional array in PHP. We simply recursively run array_merge() on the all the values inside the provided array:
Thursday, September 5, 2013
Upgrading Node.js
I recently ran into a bug while running some npm tasks. The solution offered online was to upgrade Node.js to at least verison 0.10.15.
The easiest way to do this is with a package called n. It bills iteslf as a tool for simple node binary management and simple it is.
Install it with:
Then install whichever versions of Node.js you like:
n
and then using the up/down arrows to navigate amongst the installed versions
or install the latest version:
n latest
or the latest stable release:
n stable
Remove a version with:
n - 0.9.6
Overall, n makes managing Node.js versions a breeze.
The easiest way to do this is with a package called n. It bills iteslf as a tool for simple node binary management and simple it is.
Install it with:
sudo npm install -g n
Then install whichever versions of Node.js you like:
n 0.10.15
n 0.9.6
choose from amongst installed versions by launching the app with no arguments:n
and then using the up/down arrows to navigate amongst the installed versions
or install the latest version:
n latest
or the latest stable release:
n stable
Remove a version with:
n - 0.9.6
Overall, n makes managing Node.js versions a breeze.
Subscribe to:
Posts (Atom)