PreSonus Studio One Tip: Turn off the Scratch Pad hotkey

Ever try to paste something using “⌘V” but accidentally just hit “V” instead which opens the Scratch Pad? Well, I just did on a huge project and it crashed (M1 Max MacBook Pro 64GB Ram) making me lose some work (thankfully auto-save is a thing).

If you’re clumsy like me and keep hitting that dang “V” key by accident, do yourself a favor and remove that hotkey assignment (or if you use the Scratch Pad frequently, assign it to a different key) in the preferences pane as follows in the screenshot:

Drupal, Lando, S3FS module, and Image Styles

The bug: Image styles don’t generate (they all return 404) when using the following:

So you’ll need to override lando’s default vhosts file. You can do so by doing the following in your .lando.yml file.

Then you’ll need to create a file in your app root lando/default.conf . To start, you can go to the lando/drupal recipe page , go into the recipe you’re using, and then copy the default.conf.tpl into your lando/default.conf file.

Next, locate the following snippet:

And replace it with the following snippet (only regex is changed)

I also opened a GitHub issue in case someone on the project wanted to commit back to the project. I may get around to it if I have time.

Hope this helps. I spent a couple hours on this since I didn’t know why my image styles weren’t generating and I couldn’t find anyone else that was running into the same problem. Good luck!

Adele – Can I Get It (CORRECT guitar chord voicing)

I tried learning this on the guitar from the top Google searches on different guitar chord sites, and not only is it really hard to play with the chord voicings they provide, it also doesn’t sound right either.

Here’s what they give (incorrect “standard” chord voicings which don’t sound like the recording):

If you listen carefully, there’s a slide in the root note between G and Dm which leads me to believe that Dm is actually played in an alternate voicing (on the 5th string).

Try this out. It fits better in the hand too:

And then for the chorus, It’s all chords on the first string since it’s easier to get that muted sound with your left index finger

Hope this saves you all some time and pain from trying to learn it the wrong way (which also doesn’t sound anything like the recording).

I miss my old mancave

  • Left 3 screens: iMac 27″ retina (1st gen!) for coding
  • Middle 2 screens: Windows gaming, streaming, and video editing
  • Middle CRT: Hooked up to SNES for Super Metroid speedruns
  • Right two screens: Mac mini DAW

I forget when this picture was taken, but it has to have been around 2014-2015. One day, I will have enough space to make a new mancave πŸ˜€

Studio One 5, Melodyne 5, and M1

If you have an M1 Mac and have tried using Melodyne with Studio One, chances are you probably ran into this screen:

I was stuck on this because apparently I wasn’t searching for the right thing. There are plenty of articles about Studio One not being able to find Melodyne installations, but I wasn’t looking for articles related directly to M1.

Anyway, long story short, running Studio One on native Apple Silicon makes it so that it can’t detect VST plugins that need Rosetta (like Melodyne).

https://support.presonus.com/hc/en-us/articles/4407850496141

The fix is to run Studio One in Rosetta:

WordPress, New Server, and “Unable to create directory”

I recently had to move my blog from WebFaction (who was bought out by GoDaddy and then eventually shut down their services) to Digital Ocean.

I couldn’t upload files for the longest time and kept messing with file permissions as recommended from all the different Google searches I did. And nothing was working.

Turns out, my server was configured properly, but I forgot to change the Store uploads in this folder value via WordPress dashboard when I switched webservers at /wp-admin/options-media.php.

Change this value to the server’s new value!!

Hopefully this helps someone else.

Drupal 8, Smartling TMGMT, and Local Development

If you use Smartling for translation management and it’s all setup for production, here’s how to override those values on your local development environment to download pseudo-translations for easier debugging if you don’t need to test actual translations.

Add this to your settings.local.php:

Butterfly Switches Are Better

My “new” refurb 16″ MacBook Pro w/ Magic Keyboard

I just upgraded from my 2018 13″ MacBook Pro because the keyboard started randomly repeating letters “I”, “O”, and “T” which made it really hard to work fast when I had to backspace every 5 words or so.

When I heard that the 16″ MBP was in the refurb store, I couldn’t wait to try out the new Magic Keyboard. Unfortunately, all the Apple Stores are closed now, so I couldn’t go into the store to try it first. Plus, I wanted to know how the Magic Keyboard would work for me I the long term.

My first impression when I got my “new” refurb 16″ was that the keyboard FELT AMAZING. I absolutely loved it. And I loved thinking that I would never run into any keyboard reliability issues again.

But after using the Magic Keyboard for work for a week (about 10-12 hours per day), I have to say, my RSIs are getting worse. So I wanted to write up something really quick in case anyone else with the same issues as me have concerns about switching to the Magic Keyboard if they also prefer the feel of the butterfly switches.

Ok so let me rephrase the title, the butterfly switches FEEL better for me. Here are the reasons.

Reason #1: Good for my RSI

As a musician AND a programmer, I am using my hands all the time. So naturally, pushing towards 40 years of being alive, naturally I have some wrist and hand issues.

The butterfly switches have less key travel and require less effort to press. Because of this, I feel like I exert less effort when typing on the butterfly switches, and in the end, that makes my hands really happy.

Which leads me to my next point…

Reason #2: Typing is faster

Since I exert less effort when typing, I can translate that saved energy to move faster between different keys. I type anywhere between 100-120 wpm with >95% accuracy, but I feel more confident doing so on the butterfly switch keyboard.

Some people complain the switches are loud, but if you adjust your typing in such a way where you touch they keys just enough for them to register instead of jamming them like you would a standard mechanical keyboard, you’ll find that you’ll type faster too.

Reason #3: The superficial

  • Butterfly switches don’t bleed keyboard backlight around and under the keys
  • Allows for thinner laptops (supposedly)

But…

Ok, so the Magic Keyboard does have some pros.

I did mention that I had a problem with repeated keys with the butterfly switches. But the Magic Keyboard… They are tried and true to not have these kind of issues (or at least fewer issues). I never heard of anyone having basic wear and tear keyboard issues on their 2015 and earlier MBPs.

I also acknowledge that the Magic Keyboard will be appreciated by a majority of the people who do prefer the more key travel and people who like smashing their keys really hard.

Bottom line (for me)

I’ve been using this 16″ MBP for a week now, and my RSIs are now radiating from my wrists into my shoulders and neck now. I’m guessing the nerves are all connected like that somehow.

As much as I absolutely love everything else the 16″ MBP has to offer (8 cores, dedicated GPU which is great for gaming), I feel like I have to go back to a MBP with butterfly switches, even if that does mean I may occasionally have to deal with sending in the laptop for repairs once in a while.

Mobile Recording Equipment for Saxophone

It’s been a challenge finding a place to record some sax stuff in my small condo, and all the music places (stores/studios/etc) are closed due to COVID-19. Then it dawned on me that I can record in my car!

Recording studio on the go

I had to figure this out asap because my friend and former bandmate Richard Borja asked me to record a sax solo for a song he’s been working on. He asked me to post my equipment so here it is.

  • Audio interface: M-Audio AIR 192|8 (bonus: gets power thru USB)
  • Microphone: Shure B98H (from wireless mic system) + Shure RK100PK adapter to connect directly to via XLR.
  • Earbuds: Shure SE425-CL
  • Not pictured: MacBook Pro 13″ using Studio One 4

Migrating Drupal 7 Image Files to Drupal 8 Media Images (no PHP required!)

I’m new to migrate. And it’s a beast. But I think after a few dozen hours of diligence, I think I’ve figured out my preferred method.

This post is for someone who already understands how to use views, develop custom modules, and knows how to use drush migration operations.

I originally tried using migrate_drupal, which honestly did a great job at migrating my user roles, users, and taxonomies. But the site I am migrating is 5 years old with a good amount of technical debt having been touched by over 10 (and maybe even 20) developers over its lifetime, so I think it’s time for a fresh start. I want to migrate everything else (content types, files, etc) manually.

All the Drupal 7 content types were using image (file) fields, but I want the new Drupal 8 site to use media fields. I couldn’t use the migration provided by migrate_drupal, so I had to get creative.

This will be a two step process:

  1. Use D7 views_datasource module to create JSON endpoints on my old site (and since we’re using a JSON source, you can honestly migrate from anything).
  2. Write a custom migration in D8.
Read more

CSS Bold Hover/Active States – An Alternative

Lots of other places suggestion using text-shadow to handle bold hover/active states. My client had a complaint that it made the text look blurry (which it absolutely does). Here’s my solution (written using general CSS selectors). Let me know what you think!

The letter-spacing is not perfect, and there is still a tiny sub-pixel of movement, but it was a compromise between actually-bold text and blurry-bold text. Adjust to your needs.

Drupal 7 – Customizing Main Menu Links

I spent a number of hours yesterday trying to figure out how to customize individual links for the main menu. Drupal 8 is a bit more straightforward, but it isn’t quite so obvious in Drupal 7. There are no template suggestions or theme hooks in the HTML comments when you turn theme debugging on, so it took me a while to figure it out.

Thankfully, with the help of PhpStorm and xdebug, I was able to pinpoint what template file to create: menu-link--main-menu.tpl.php

Here’s my code that allows me to replicate the menu links exactly. Then customize as you wish.

Drupal, PhpStorm, and PHPCS quick-start

Pre-requisites

  • Composer
  • PhpStorm

Let’s go!

1. Composer + Settings

Run the following in your terminal:

  • composer global require squizlabs/php_codesniffer:2.9.1
  • composer global require drupal/coder
  • phpcs –config-set installed_pathsΒ ~/.composer/vendor/drupal/coder/coder_sniffer

2. Configure PhpStorm

Open PhpStorm preferences (⌘,) and go to the Code Sniffer settings. Click the “…” button.Enter the path to your “phpcs” file and click “Validate”. It should be ~/.composer/vendor/squizlabs/php_codesniffer/scripts/phpcsΒ (replace “~” with your actual home directory)Β Go back to the PhpStorm preferences, navigate to “Editor Β» Inspections”, enable “PHP Code Sniffer validation”, then choose “Drupal” in the “Coding standard” dropdown.Β Enjoy!

Drupal 8 RestWS for Dummies (Quickstart Guide)

Documentation for Drupal 8 is still really lacking. There is SOME documentation out there, but in typical Drupal 8 fashion, you have to sift through all of the pages and all of the content to find exactly what is relevant to you. This guide is an attempt to get you quickly started.

This guide is for dummies, but it also assumes you know the basics of Drupal 8. Specifically, you should be comfortable getting an installation of Drupal 8 up on your own, you have you’re comfortable editing text (config) files, and you have basic site-building skills (Creating content types, creating views, etc).

Before we get started, I want to say that, when I am making an API for a new app, I want to make it FAST. I am comfortable working with the MEAN stack (using MongoDB + Express to run your API server), but I consider myself fairly proficient in Drupal, so why reinvent the wheel every time manually writing an API when Drupal already does a great job at assembling and delivering data? I’m able to get my API working with GET requests in less than 5 minutes, and POST requests in less than 15 minutes.

OK, enough small talk – lets get started.

Read more

Officially Acquia Certified!

Thanks to iFactory for putting me through Acquia certification! I definitely would not have passed without having learned so much from working there in the past 5 months.

Here’s the breakdown:

  • Section 1 – Fundamental Web Development Concepts: 62%
  • Section 2 – Site Building: 93%
  • Section 3 – Front end development (Theming) : 50%
  • Section 4 – Back end development (Coding) : 77%

Interesting outcome since I feel that I’ve been really comfortable with my frontend development. Ah well. Feels good to finally be done with the exam!

Drupal 7 and RESTWS with Basic Authentication – Getting Started (Tutorial)

I couldn’t find a good tutorial on how to do this from the ground up, so here is a definitive one that’ll get you started.

For this tutorial, you will need

  • Drupal 7 set up and ready to go (I’m using a local server)
  • The Following Modules Installed:Β RESTful Web ServicesΒ & Entity API (required by restws)
  • Your favorite REST client for testing. I’m using “Advanced REST Client” (Google Chrome Extension)
  • A basic-medium knowledge of already how to use Drupal 7 (installing, enabling modules, etc.)

Ok, let’s get started! Here’s a basic new installation. Yay.

Read more

Samsung S34E790C and Retina iMac (2014) … and MacBook Air (2013)

pdpdefault-ls34e790cns-za-600x600-c1-052016

What a beautiful display.

Thanks to my friend Tim sending me so many links from /r/battlestations, I’ve been thirsty for an ultrawide display. I found a good deal for one on Amazon in their refurb warehouse, so I bit the bullet and bought one.Β Although I did read that they were compatible with Mac, I didn’t know if they’d be compatible with mine. Let me just clear it up for the record: yes it does work!

The refurb only came with a display port cable and no mini-dp adapter, even though the manual said it should have, so I had to wait an extra couple days and order one. I was scared that it would need an active dual-link DVI adapter like my Crossover 27″ IPS display, but to my surprise, it didn’t! It worked directly with the display port cable (with the adapter) on both my Retina iMac and my 3-year-old MacBook Air, so I am one happy camper.

And let me tell you, this is the most beautiful display I have ever used, ever.

img_8288-2

My current battlestation! Retina iMac on left, Samsung curved 34″ in the center, Crossover 27″ IPS on the right.

1 2 3 5