Category: Dev Stuff
-
How to debug with PHPStorm and PHP builtin server
I was playing with Symfony recently, and I needed to setup debug in PHPStorm using the PHP internal web server. I’ve setup xdebug with PHPStorm in multiple environments, and each time I find a different glitch. Lucky me š So, I will assume that you have PHP, xdebug, PHPStorm installed. These are the steps: Edit […]
-
A component-based deploy strategy for WP Engine
Deploying to WP Engine, one component at a time.
-
List the size of folders recursively in Linux
I needed a summary of how much space the single subfolders where taking on disk. You can use the du command, with the right flags du -skh * Here is an example output giustino:~/tmp/VVV (develop *) ā du -skh * 12K CHANGELOG.md 220K config 4,0K CONTRIBUTING.md 32K database 4,0K LICENSE 8,0K log 36K provision 20K […]
-
Select the id that begins and ends with certain values
CSS selectors have gone a long way from their beginnings. Today you have multiple choices to select elements in the page. Today I needed to select all the elements with the id matching this regex: fixed_string_(.*)_digit But CSS doesn’t let regex. To do this, you can combine these two attribute selectors: [id^=value] // Element with […]
-
How to cancel last local commit in git
I keep forgetting this. If you want to delete the latest commit that you have not pushed, you can do it using: $ git reset HEAD~1 This will remove the commit and leave your changes untouched. If you want to get rid completely of the change, you can use git checkout $ git checkout .
-
How to expand all child nodes in Chrome
This is a little one that I discovered today. You can expand all the child nodes of an element in Google Chrome’s dev tools with ALT + click on the little gray arrow beside the element. Really nice!
-
The importance of developing in a good environment
No, I’m not talking about that strange smell in your room. This is a story that happened to me a while ago. It was certainly my fault, I could be more cautious, but in the end the net result was positive. First job, first delivery, first meeting to check my work. Imagine: I was awake […]
-
PhpStorm Tips #1 – Automatically declare a class field
Everyone should know how to get the most out of his working tool. To me, it’s the editor I use to code. That’s not the case for many of my fellow programmers, who know just the basic stuff. That’s why I’ve decided to realize these little tips. Here’s the first one, on how to automatically […]
-
How to update a junction table?
Frameworks are well and good, but sometimes they shield us from simple concepts that we, as developers, should know. Let me tell you a story about this theme, and what happened.