About ten days ago, at the PHP Unconference
I presented “VIM as a PHP IDE”. The talk was based on this post
and the video is available here:
Read more »
Sometimes you remove a branch via web (github, gitlab…) but you still have its reference when you run: $ git branch -a remotes/origin/featur-cool-feature-we-are-working-right-now remotes/origin/feature-removed-long-ago # This guy is about to... Read more »
TLDR; Visit your github personal tokens page, create a new token and use it in the following command: composer config -g github-oauth.github.com <oauthtoken> You can read this article to understand... Read more »
So I got the following error when trying to deploy: cap staging deploy Error: cap aborted! SSHKit::Runner::ExecuteError: Exception while executing as staginguser@staginghost: git exit status: 128 git stdout: Permission denied... Read more »
TLDR; This is the TLDR version. sudo yum install sendmail sudo make all -C /etc/mail/ sudo service sendmail start Testing: echo "Subject: test" | /usr/sbin/sendmail -v my@email.com The long version... Read more »
I’m not sure if that is really a design pattern. But I find that simple and it helps to make code intent very clear. It goes along with DDD principles.... Read more »
For some stupid reason I don’t even want to try to understand, Google Chrome sometimes won’t allow you to select text. Apparently it thinks you have a touch device. How... Read more »
So you are stuck with SVN, huh? So here is what you will do: git svn clone -s --prefix=origin/ https://svn.url/projects/{my_project} This assumes that you have {my_project}/trunk, {my_project}/tags and {my_project}/branches Work... Read more »
EDIT: you can watch a video based on this post here On this post I will try to share my vim adventure for the last 2 years. I’ve been using... Read more »
This is how I created a patch with the diffs I wanted to apply: git diff HEAD branch-whose-changes-i-want-to-aply > /tmp/diff.patch And here is how to apply; git apply /tmp/patch.diff Resolving... Read more »
Every time we have a code review I need to fix some things. Besides bad design, off course, some docblocks are missing, anotations and so on. It is not so... Read more »
I was struggling to find the specific types of warnings to suppress. So here is a list of Warnings that can be suppressed: Unused code: UnusedPrivateField UnusedLocalVariable UnusedPrivateMethod UnusedFormalParameter Naming:... Read more »
This is how you can get the view helper manager from the service locator/service manager.
<?php
$viewHelperManager = $serviceManager->get('ViewHelperManager');
For the form element manager:
<?php
$formElementManager = $serviceManager->get('FormElementManager');
Source.
Read more »
Install vdebug. Configure xdebug and restart your php-fpm and apache/nginx. Here is the configuration I used. They can be found in the php.ini or in a aditional ini file, which... Read more »
You can save the session by doing this: :mksession ~/.yesterday.vim Then tomorrow you can source that vim file and you’ll have your old session back: :source ~/.yesterday.vim Alternatively you can... Read more »
So you want to download all those [your favorite tv show here] videos from that nice index page. Here’s what you do: wget -c -r –no-directories –no-parent http://somewebsite.com/some-folder -c –... Read more »