Blog Archives

Only Migrating Published Nodes in a D7 to D8 Migration

I’m not going into much detail here but hopefully this helps someone. If you need to migrate only published nodes you can extend the d7_node plugin and add a condition to the query. First, create a file in your module like /modules/custom/mysite_migrate/src/Plugin/migrate/source/MysiteNewsNode.php

Tagged with: , , ,
Posted in Tech Tips

Automatically Put Files Into a YYYY/MM Directory Structure

 

Tagged with:
Posted in Development, Tech Tips

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

Mac High CPU Usage – WindowServer

DISCLAIMER: I’m writing about my personal experience here. I am by no means doing some exhaustive investigation. The changes I explain below seem to make a difference, at least according to what Activity Monitor is showing for CPU usage. My

Tagged with: ,
Posted in Tech Tips

Python Faker with the Fake App (Mac OS)

Fake App is a fantastic way to automate form filling, especially for folks without coding skills. The click-and-drag to target an element lets you quickly build your macros. Python Faker is a utility library that I leverage with tools like Fake App,

Tagged with: , , ,
Posted in Tech Tips

Bookmark with Dynamic Components via Keyboard Maestro (with Toggl Reports example)

Here’s an example of how you can use Keyboard Maestro to create bookmarks that use dynamic components. For this example I wanted to create a bookmark that would give me the correct URL to get a report of the last

Tagged with: , , , ,
Posted in Tech Tips

Adding Entity Wrapper Class from Field Value using Display Suite

NOTICE: This works fine in Drupal 7. For Drupal 8 please note: https://www.drupal.org/node/2863420 This may not work with paragraph bundles (because you don’t have a Token view mode). Maybe there’s a way, but I don’t have time to mess with it. Sometimes

Tagged with: , , , ,
Posted in Tech Tips

Backing up a File Before Overwriting It (in Drupal 7)

I’m communicating with a 3rd party SOAP API to pull some data into a CSV file. The CSV file will be used by Feeds and/or Migrate so it’s important to have the file named exactly the same for each run. I

Tagged with:
Posted in Tech Tips

Triggers in iTerm – Watching For Specific Strings

I was recently performing a git-add in patch mode (  git add -p ) as I normally do, and realized there were a few lines I needed to make sure I didn’t commit. These lines were sandwiched between other lines that I did want

Tagged with: , , , , ,
Posted in Development, Tech Tips