Arturo Linares

I decided to give a chance to the editor I spent many years before I switched to Neovim: Sublime Text. I found that the plugin ecosystem is not as big as VS Code, but it has enough packages to make modern PHP work very well. These are the features I was able to configure:

  • Code diagnostics
    • Coding style
    • Semantic errors
    • Static analysis errors
  • Debugging
  • Test runners
  • Refactoring tools
    • Rename variables and functions
    • Extract interfaces
    • Move classes
  • Code navigation
    • Find references
    • Go to definition
    • Find implementations
    • etc
Read more...

Using the method ::toUrl() in custom entities is very handy when using pre-defined URLs, like canonical and add-form. But what if we want to create a new URL and use it in the same way?

Let’s assume we have a custom entity named CustomPost, and that we wish to obtain a “preview” URL using this method, how can we do it?

$post->toUrl('preview');
Read more...

  • time-now: Returns the current time.
  • make-time: Creates a new time value.
  • time-add-day: Adds a day to a given time.
  • time-day-begin: Finds the beginning of a day for a given time.
  • time-day-end: Finds the end of a day for a given time.
  • uid?: Checks if a component matches a specific UID.
  • occur-in-time-range?: Checks if an event occurs within a specified time range.
  • due-in-time-range?: Checks if a task is due within a specified time range.
  • contains?: Checks if a component contains a certain text.
  • has-start?: Checks if a component has a start time.
  • has-end?: Checks if a component has an end time.
  • has-due?: Checks if a task has a due date.
  • has-duration?: Checks if an event has a specified duration.
  • has-alarms?: Checks if a component has alarms.
  • has-alarms-in-range?: Checks if a component has alarms within a specified time range.
  • has-recurrences?: Checks if an event is recurring.
  • has-categories?: Checks if a component is assigned to certain categories.
  • is-completed?: Checks if a task is completed.
  • completed-before?: Checks if a task was completed before a specified time.
  • has-attachments?: Checks if a component has attachments.
  • percent-complete?: Checks the completion percentage of a task.
  • occurrences-count?: Counts the occurrences of an event within a range.
  • starts-before?: Checks if an event starts before a specified time.

Example:

A filter that shows tasks that don’t have a due date or a start date.

(or (not has-due?) (not has-start?))

Reference in the code can be found here.

tldr; add PubkeyAcceptedKeyTypes +ssh-rsa to your gitlab entry on ~/.ssh/config.

Read more...

I've been using WSL2 to develop Drupal sites for some months now, and it has been a surprise to me how well it works. I have native Linux speed and great tools (I use Sublime through X server and VS Code).

Read more...

#windows

I'm using the game bar to create quick screencasts. The only problem is that the videos are too big to show only a few clicks. So, to quickly optimize a video for sharing I need to transcode it as easy as possible.

Updated with a new windows native tool.

Read more...

TL;DR: Needed a way to easily deploy and manage legacy and new sites without spending a lot of money. Dokku gives me the awesome Heroku developer experience on a cheap VPS box.

Read more...

I normally work on different and very active projects in several testing environments. I needed a simple and fast way to generate visual regression tests between them, or even to just to compare my local environment to an integration server. However, it was cumbersome to edit backstop configuration files frequently just to change servers, thus I created a tool that simplifies the task a lot:

https://github.com/arturolinares/easy-vrt

Read more...

#git

Some useful commands to find commits using Git:

Read more...

#windows

Surfae Duo

This week Microsoft unveiled their Surface Phone, called Surface Duo. It looks great and I think it puts the company back in the innovators list.

Read more...