Creative ideas have to be shared, copied and adapted!
Day quote…
  • Science without religion is lame, religion without science is blind Albert Einstein

Learning Functional Programming with JavaScript – JSUnconf 2016

Functional Programming? Oh yeah, that is one of the most interesting paradigms in computer sciences that is being used since a long time ago, however in the last years it has obtained a particular interest because of JavaScript, in fact, I bet you are being using functional programming without even know it.

In this great conference by Anjana Vakil you will learn the fundamentals of this paradigm as well as some examples using the JavaScript language.

As a complement to this conference here is an awesome article called “A practical introduction to functional programming by Mary Rose Cook

Delete files with a pattern recursively using the terminal


This is just a simple way to delete files recursively using your terminal in any UNIX-like operating system:


-name “FILES_PATTERN” : File pattern.
-exec rm -rf {} \; : Delete all files that match the file pattern.
-type f : Not include directories.

How to know if a user is authenticated or not in WCM 8 and 8.5


This is pretty simple way to check if any user has a session started or not; this is useful in cases where you want to display or execute an specific code depending on the user session. To create this kind of validation we can take advantage of the WCM plugins Equals and NotEquals


Update Node.js using the terminal


These are just the steps to update Node.js by using your terminal:

The n package represents a Node helper, and running this command upgrades node to the latest stable version.

Just to confirm we can check our version:



Uncommon Sense by Derek Sivers


A great talk about how a business can evolve, from being just an idea to become a millionaire business.

If you have an amazing idea but no execution, it’s not worth anything. You haven’t done anything. It’s worthless.

If you had a good idea and you’ve actually gone and made it happen in a pretty good way, you could maybe make a million dollars. And if you have an amazing idea, and you have an amazing team and you do great execution, you could maybe make 20 million dollars.

Derek Sivers in Uncommon Sense – live @ WDS

Logging detailed error messages when running Gulp.js tasks

Gulp.js has become one of the most used task managers nowadays. But sometimes, when running several tasks with many pipes( ) on them, it is very difficult to understand what’s wrong or the actual reason why our task is not working as expected. For others like me, who like to have a better error description, here is what needed to do:
Install Gulp Util
Import the Gulp Util by using the following statement:
Finally, in your pipes, add a new “event” to manage the “error”, e.g. when you are uglifying your code, here is how you can attach the error handler of gulp util:

Notice the “on(‘error’)” part, that is where the magic happens.

Hope you find this top useful, see you next time!

Could not open input file: composer.phar error in Symfony 2. SOLVED.


This is a common issue that is related with a bad installation of our favoritte PHP package manager: Composer. Let’s fix it:

Open your terminal and run following comand in order to get the latest version of Composer:

I recommend you to move the composer.phar file to a global “bin” directoy, in my case (OS X) the path is:

Create an alias for easy access:

If everything is ok, now it is time to verify our Composer version:

That’s it! Start making great Symfony 2 projects 🙂

My personal .gitignore file


Lesson learned

After doing this file many times, I decided to build my personal .gitignore file; I use to add it in my very fist commit as a good practice in every single git repository I create.

Currently we are ignoring:

  • Operating systems’ temporary files: Mac OS X, GNU/Linux, Windows.
  • IDEs and editors’ configuration: Vim, Sublime Text, Notepad++, Eclipse, Netbeans, Xcode, IntelliJIDEA.
  • Other Control Version Systems: CVS, SVN

More information about ignoring files:

Note: if you want to create your own configuration in your .gitignore you could use:

How to integrate this file into my project

  • Download or copy following file/content in the root directory of your project with the name .gitignore (gitignore.txt)
  • If you download gitignore.txt file, please rename it to .gitignore

    Common issue: “OS X doesn’t let me to rename my gitignore.txt to .gitignore”:

    “You can’t use a name that begins with a dot “.”, because these names are reserved for the system. Please choose another name”.

    A workaround for this is to:

    1. Open the terminal
    2. cd to the directory with gitignore.txt and run the following command
    3. mv gitignore.txt .gitignore
  • Add .gitignore file to your repository (git add)
  • Commit (git commit)
  • Upload your commit to remote server (git push)


Once Git starts to watch/track any file, for example hello.txt in the repository, it is NOT possible to say “Hey git! now, ignore my file hello.txt“. Unless you read this post: How to force Git to “ignore” tracked files.

Hope you find this .gitignore useful, see you next time!

How to force Git to “ignore” tracked files


Well, well, well, you decided to start with the most incredible version control system: Git; you made your repository, start adding some commits, life was great! But suddenly, your realize there are some configuration files that started to be tracked by Git, because you forgot to add the famous .gitignore file.

Deleting those files is not an option because you need them, but those files are only interested/required for you, not for other team members. After researching a little bit, many people say there is no way to “ignore” files once there are been added to the repository; but don’t worry that is not totally true, there is a way to do that, let’s see it:

Remove the file from the index

Commit this “removed” operation

Add this file to the .gitignore and commit it

Edit the .gitignore file to include this new “ignored” file/folder:

That’s it for today! Enjoy your day 🙂

Alex Arriaga