Category Archives: PHP

Cristiano Diniz da Silva’s invitation is awaiting your response

LinkedIn
Cristiano Diniz da Silva would like to connect on LinkedIn. How would you like to respond?
Cristiano Diniz da Silva
Cristiano Diniz da Silva
Software Engineer at Zumba Fitness LLC
Confirm you know Cristiano
You are receiving Reminder emails for pending invitations. Unsubscribe
© 2014, LinkedIn Corporation. 2029 Stierlin Ct. Mountain View, CA 94043, USA

bi7if1-i03rwhxs-4u.gif

Advertisements

Cristiano Diniz da Silva’s invitation is awaiting your response

LinkedIn
Cristiano Diniz da Silva would like to connect on LinkedIn. How would you like to respond?
Cristiano Diniz da Silva
Cristiano Diniz da Silva
Software Engineer at Zumba Fitness LLC
Confirm you know Cristiano
You are receiving Reminder emails for pending invitations. Unsubscribe
© 2014, LinkedIn Corporation. 2029 Stierlin Ct. Mountain View, CA 94043, USA

bi7if1-hzuzbk9e-1h.gif


Which wolf do you feed?

This is a pretty good story that I heard today. It has all about how your attitude can affect your day to day life.
A Cherokee Legend

An old Grandfather said to his grandson, who came to him angry at a friend who he felt had done him an injustice, "Let me tell you a story…

I too, at times, have felt a great resentment for those who have taken so much,with no seeming sorrow or remorse for what they do. I have struggled with these feelings many times." He continued, "It is as if there are two wolves inside me engaged in a challenging conflict.”

"One is evil – he is anger, envy, sorrow, regret, greed, arrogance, self-pity, guilt, resentment, inferiority, lies, false pride, superiority, and ego. The littlest thing will set him into a fit of temper. He fights everyone, all the time, for no reason. He cannot think because his anger and hate are so great. It is helpless anger, for his anger will change nothing.”

He continued, "The other is good – he is joy, peace, love, hope, serenity, humility, kindness, benevolence, empathy, generosity, truth, compassion, and faith. He does no harm. He lives in harmony with all around him, and does not take offense when no offense was intended. He will only fight when it is right to do so, and in the right way.

Sometimes, it is a challenge to live with these two wolves inside me, for both of them try to dominate my spirit. The same challenge is going on inside you – and inside every other person, too."

The grandson thought about it for a minute and then asked his grandfather, "Which wolf will win?"

The old Cherokee simply replied, "The one you feed."

Do you ever stop to ponder….which wolf inside of you do you feed more?


Bug or feature?

 

wildebeest

 

 

 


Creating your PHP Onboarding for Windows machines

There are many many ways to have a full LAMP stack on a Windows machine and use it for PHP development like WAMP, for example. This is ok if you are developing just for fun, but in corporate level an on-boarding environment is much preferred. Having a pre-defined server image with all that is necessary to almost replicate your production server on a developer machine helps on preventing errors and, most importantly, quickly have new developers up-to-speed with the corporation development environment.

Consider that you would need:

  • Apache
  • PHP
  • MySQL
  • Memcache
  • APC
  • some extra libs
  • GIT repository

Creating this under windows can be such a hassle and in cases like this bundled solutions does not work.

To create a full LAMP stack on your windows machine and have it 100% stand-alone I have used Vagrant. On the prior version of Vagrant (V1) you had to use Putty in order to ssh to the VM and that was a painful process, with the newer version (V2) you can use built in Vagrant SSH as long you install an SSH support library like the one from GIT. There is a trick on the GIT installation, you must choose the option with the Linux / Unix commands (it has a red warning message about overwriting windows libs).

Prior installing Vagrant you will need to install Virtual Box. It is a Oracle virtual box machine. Very useful if you are on OSX or Linux and need to run tests on Windows IE9 (sig). This part of the process is very well explained on the Vagrant documentation.

Now comes to Vagrant install. It is fairly easy. Install Vagrant, then open command line and run “vagrant init”. It will create a default vagrant file with most of the basic things defined. Here comes a trick. The default vagrant file tries to download the precise VM.  I have tried to contact Vagrant a couple times on Twitter and with no luck. There is an issue with the download of this box, the server resets the connection prior the download to be finished.

There is a way out of this: VagrantBox.es – Select the box that you best consider that matches your environment, add it on vagrant (vagrant box add) and finally update the vagrant file to use the new added box.

After this, everything is as simple as setting up the environment. Unless you have an specific need to add the GIT repository files under another folder you can set it all under the vagrant folder (same folder where the vagrant file is located).

I could use the GIT command line on windows to clone / commit my repositories, but using the GIT windows tool from GitHub is way too fun 😀

I know that most of PHP developers use either Linux or OSX for development. It is much easier to setup and use, but if you are stuck with Windows, you might as well benefit of this.

Just a note, off course the main environment mentioned here was LAMP, but this same process can be used for Ruby, Phyton and may other hipster languages available =D

 

Updates:

I had a networking issue with the current box that I’m using. It seems that it is a common issue with some boxes as mentioned here – https://groups.google.com/forum/?fromgroups=#!topic/vagrant-up/Yeu6UF-GJO8

To fix run this: sudo /etc/init.d/networking restart

If you never installed a LAMP stack before, this article here will give you all the steps to install it correctly: http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-ubuntu-12.04-lts-lamp


The future of blogging

… or at least the future of this blog.
It has been a while since I have last written anything on this blog, reason is, lately I have been retweeting more and sharing more stuff on Google+ than writing here.

There is a lot happening with technology, PHP and web development in general and even if I wanted to, writing about everything is barely impossible.

Considering this, I have decided to keep writing on this blog but when only the situation requer to. For example, if there is a new piece of technology, PHP feature, etc that requires a longer explanation or more words than 140 chars, it will be here, otherwise, check Twitter and Google+.

To make this feed easier to check I have added some of the social medias that I’m part of in www.mcloide.com . There you will find my twitter account, my G+ account and some other accounts like Github and Coderwall.

See you on twitter or till next post right here 😉


Phil Sturgeon • Why some people hate PHP | Blog

A worth reading post: Phil Sturgeon • Why some people hate PHP | Blog.


Anonymous hacks Paypal and leaks 28K accounts info

You have already probably seen this all over the web by now, so a piece of advise:

– Go to Paypal.com right now and change your password

Don’t wanna give your bad-luck a chance do you?

Original article: http://thenextweb.com/insider/2012/11/05/anonymous-leaks-sensitive-data-from-alleged-paypal-hack-on-global-protest-day/


OWASP top 10


StackOverflow Help – PHPUnit question

Please share, really need some help with this:

http://stackoverflow.com/questions/13039291/phpunit-testing-the-send-method-parameters-from-swiftmail


%d bloggers like this: