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
/** | |
* Converts doctrine to array | |
* @param $data | |
* @param $single it's run's only once (no recursion) | |
* @return array | |
*/ | |
public function doctrine_to_array($data, $single = false) { | |
if (is_object($data)) { // its object | |
$methods = get_class_methods($data); | |
$methods = array_filter($methods, function($val){ return preg_match('/^get/', $val); }); |
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
# For some reason, installing Elixir tries to remove this file | |
# and if it doesn't exist, Elixir won't install. So, we create it. | |
sudo touch /etc/init.d/couchdb | |
# Standard Ubuntu Elixir installation instructions | |
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb | |
sudo dpkg -i erlang-solutions_1.0_all.deb | |
sudo apt-get update | |
sudo apt-get install elixir |