development
Bash History Lesson #1 - Timestamp
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.
- peter's blog
- Login or register to post comments
Sensible Auto Git Tagging Deployments to Production on Jenkins
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!
- peter's blog
- Login or register to post comments
Make word-back and word-forwards navigation work again on PhpStorm's Terminal
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!
- peter's blog
- Login or register to post comments
Create Diagrams Inside PhpStorm with PlantUML
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.
- peter's blog
- Login or register to post comments
Fix MAMP Error: "General error: 2006 MySQL server has gone away"
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:
List custom URL Schemes in OS X
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:
- peter's blog
- Login or register to post comments