Bash terminal
Bash

How to encrypt and decrypt text in bash

Sometimes you need to encrypt a text string or a whole file because it is not recommended (or desirable) to use it as is. What to do if you see yourself in this situation? Make use of the openssl command. The openssl program is a command line tool for using the various cryptography functions of OpenSSL’s crypto library from the…

Continue Reading

Vim editor
FreeBSD

FreeBSD: how to enable clipboard on Vim

If you have asked yourself “how to enable clipboard on Vim?” or “is it possible to access the system clipboard on Vim?“, the answer is: yes. This is how you can do it. Note: in this example I’m using FreeBSD, but the principle is the same in other *nixes. First, you need to get sure that you installed Vim package…

Continue Reading

PHP

Use of undefined constant SIGINT

Recently, while setting up a FreeBSD laptop, I was configuring Phpactor as Language Server for PHP. The idea was to have it working in Vim through the YouCompleteMe plugin. While trying to start the Phpactor server, I received the following error (among others): Use of undefined constant SIGINT – assumed ‘SIGINT’ (this will throw an Error in a future version…

Continue Reading

Vim editor
Linux, PHP

Vdebug: Xdebug not showing full array contents

Have you ever tried to debug some PHP code in Vim just to find that Xdebug won’t show the full array contents? Fortunately the DBGP protocol allows you to set features for debugging, such as the max length of data that the debugger returns. You can set these features in the Vim dictionary g:vdebug_features, and they will be sent to…

Continue Reading

Bash terminal
PHP

Bash API Contract Testing

We have been doing some API development at work, and at one point we started evaluating tools for API contract testing. One of the explored approaches was drafting a bash script that glued some native Linux tools together in order to achieve the desired results. That’s how this tool came to be. It is a proof of concept (POC) used…

Continue Reading

Bash terminal
Bash

Bash: echo ignores here-documents

Well, not quite. I mean, if you are trying to use here-documents with the echo command in bash and it seems you are getting an empty line instead, the issue might be that echo is displaying only the first line, and it turns out to be an empty one. Consider the following example: $ echo < this is not >…

Continue Reading

vim-gutentags vimrc config
Short Articles

vim-gutentags ignoring exclude parameters from ctags

This is another quick-and-dirty post added with the solely purpose of helping someone facing the same issue. If you happen to be using vim-gutentags with vim, and are facing difficulties making it excluding certain paths from your tags file using the gutentags_ctags_exclude option in your vimrc, make sure that you are using the same file path format (relative vs. absolute)…

Continue Reading

PHP, Short Articles

Magazon WordPress Theme Error

Yo!, what’s up? I’ll post this here in order to (hopefully) save someone some time: If you happen to be using a WordPress theme called Magazon (even the latest versions), you probably found out that it’s broken. The issue gets worst as in latest version of WordPress it is not evident what the problem is because WordPress suppresses the error…

Continue Reading