Blog Archives

Using PHPStorm for Git Diff and Merge tools (Mac)

You love git-difftool, right? Of course! You also love PHP Storm, right? Of course! This easy procedure lets you use PHP Storm as your git-difftool. Open a project in PHP Storm Click Tools » Create Command-line Launcher… Edit your ~/.gitconfig

Tagged with: , ,
Posted in Development, Tech Tips

Find and Open (in vim) Multiple Files

This is a quick set of examples for finding and opening multiple files in Vim.

 

Tagged with: ,
Posted in Development, Tech Tips

Basic HTTP Authentication in Drupal Site Using settings.php

Here’s a quick and painless way of preventing public access to a Drupal site using settings.php (or settings.local.php):

 

Tagged with: , , ,
Posted in Development

Valet+ Quickstart for Drupal Development

Here’s a README.md file that I’ve developed over time. It explains how I setup and use Valet+ for quick and powerful Drupal development. Sorry for the formatting. I’ll get markdown support on my blog sometime…

 

Tagged with: , , ,
Posted in Development

Setting up OCI8 (PHP Oracle module) on Webfaction

Webfaction, my favorite web host, allows you to compile PHP modules in your home directory for use on your websites. Here’s the process for configuring OCI8 to talk to Oracle databases:

 

Tagged with: ,
Posted in Development

Drupal 8 User Photo Update Form

Recently I had to come up with a simple way for users to change their member profile photo without requiring them to visit the user edit screen. Here’s the result: First, I added a new Image field called “Member Photo” to

Tagged with: ,
Posted in Development

Creating a Drupal 8 Route to a User Page with Dynamic User Object

It took me some time to figure out the right combination of properties to make this work. My goal was to create a form that lives at /user/UID/photo (think /user/1/edit). I wanted the user object to be passed into the

Tagged with: ,
Posted in Development

Make a Field Label “visually-hidden” in Drupal 8

Using the Form API you can add a visually-hidden class to a field using the “#title_display” property as shown here:

 

Tagged with: ,
Posted in Development

Drupal 8 Search API Tips

Here are some quick tips for configuring Search API for Drupal 8. Easy Indexing If you’re like me you rely heavily on Display Modes (aka View Modes) for your entity types. The most convenient way to get Search API to index

Tagged with: , , ,
Posted in Development

Manually Checking Path-based Visibility in Drupal 8

This mimics the path visibility settings on block configurations.

 

Tagged with: ,
Posted in Development