Syndicate content

development

warning: Creating default object from empty value in /var/www/petercarrero.com/modules/taxonomy/taxonomy.pages.inc on line 33.
Oct 03
0

Bash History Lesson #1 - Timestamp

Mon, 10/03/2016 - 08:18 — peter

The Problem

The command line is the developer's number 1 friend and ally, but usually out-of-the-box configuration is very bare and uninformative. Every seasoned developer out there will have their own way of customizing the shell prompt, shell commands and even which shell better fits their needs. While this post will focus on the bash history command, bash being the default shell on the vast majority of systems out there, the same concepts can be used to customize other shells as well.

To be clear: we are going to spice up the results of the history command on the bash shell.

Sep 27
0

Sensible Auto Git Tagging Deployments to Production on Jenkins

Tue, 09/27/2016 - 07:03 — peter

The Problem

You've built your code, and you have a spiffy Jenkins setup to pull from git and run your tests for you, and you want to keep track of the pushes you do to your production environment. By default, Jenkins produces a local tag on the job's workspace named something like this: jenkins-<job-name>-<sequence-number>. However that doesn't tell you much. And that is not pushed to the remote repo.

As a developer, I'd prefer to just look at the list of tags on a repo and know which ones refer to pushes to production, and also know some more information about them without having to check them out and without having to inspect their logs. As you must know, according to Uber-Geek Larry Wall, developers are lazy! And impatient! And full of hubris! And that is a very good thing!

Sep 23
0

Make word-back and word-forwards navigation work again on PhpStorm's Terminal

Fri, 09/23/2016 - 22:12 — peter

The Problem

JetBrains' IDEs are awesome! The more you get into them, the more you rely on them. One problem, however, has pestered me for a while: the built-in terminal doesn't have support for the word-back and work-forwards shortcut. You know, when you hold alt + left-arrow or alt + right-arrow? Most of the time I use a Mac, so in the past I used a pretty nifty program called "Keyboard Maestro" to create a shortcut that worked only on PhpStorm and other JetBrains IDEs that would do that for me, but as well as that worked, I always wondered if there was a nicer way. Turns out there is!

Sep 22
0

Create Diagrams Inside PhpStorm with PlantUML

Thu, 09/22/2016 - 20:35 — peter

Diagramming in PhpStorm (or any other JetBrains IDE)

A picture is worth a thousand words, and a well-constructed diagram is worth many pictures! And if it is super-simple to create these useful diagrams, why not, right? This quick post will guide you (and future me) on the steps necessary to get PlantUML - a diagramming library - setup in JetBrains PhpStorm.

Jul 17
2

Fix MAMP Error: "General error: 2006 MySQL server has gone away"

Wed, 07/17/2013 - 19:46 — peter

While working on a local copy of a Drupal site I am helping develop, I ended up hitting the following error:

General error: 2006 MySQL server has gone away: SELECT ff.* FROM {filter_format} ff ...

Ugh! Now what?! We need to change a setting on MySQL that ships with MAMP. As it turns out, the default max_allowed_packet is set to 1M and it needs to be higher. Changing that to 100M did the trick for me. Locate your my.cnf file and add the following setting under the [mysqld] section:

Oct 14
0

List custom URL Schemes in OS X

Sun, 10/14/2012 - 16:02 — peter

was playing around osx and figured out how to list all the custom url schemes (from the command-line)...

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister
-dump|egrep "(bindings.*\:$)"|sort

The output is something like this: