Lathe Stand Plans

Here’s my 5-foot adaptation of the lathe stand from https://www.youtube.com/watch?v=MJZycw5NUF8 (Thanks Keith!)

Here’s what it took for supplies:

  1. (1) 4×8  3/4 birch plywood
  2. (7) 2×6-8ft
  3. (3) 50lb bags of sand (had to fill trash 4 trash bags because 50lb bags too big)
  4. (1) 4×8 hardboard
  5. Lots of Kreg pocket hole screws
  6. Wood glue
  7. Countersink bits

My legs are at 5 degrees. The only adaptation I made as I built it was that I needed more room for my feet, so I moved the entire “sand box” up several inches. The only thing this changed was to shorten the length of the two 2×6 cross boards at the bottom (the one that says 9 7/8″ in the drawing).

Tagged with: , , ,
Posted in DIY, Woodworking

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 365 days of Toggl time entries. Toggl lets you pass a start date and an end date in the URL. Using KM it’s easy to replace those values with calculated date values.

Click the screenshot at the right to see the macro, which I’ve also provided here: Toggl entries for the last 365 days.kmmacros. Read more ›

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 see https://www.drupal.org/node/2863420

Sometimes as a developer you need to provide your Drupal authors with the ability to choose different variations of a particular content object. For example, imagine you have a Callout paragraph bundle and you want the author to choose between a Dark or a Light colorscheme; if the user chooses Light, the font colors appear dark over a light background. To achieve this you need a dark or light class on the entity wrapper based on whichever the author chose; this would let you write CSS to target each color scheme. Using Display Suite this is an easy problem to solve and doesn’t require any preprocess code or other hand-coded solution.

This solution requires Token and Display Suite. You will need to enable the ui modules from these, as well as ds_extras to give you the CSS class functionality. Read more ›

Tagged with: , , , ,
Posted in Tech Tips

Friendly URL for Views Contextual Filter on a Boolean Field

I have a story content type that has a corresponding Views listing page. The stories can be flagged as Featured through a checkbox/boolean field ( field_story_featured ). The stories also have a Story Type value ( field_story_type ). The views listing page needs to have the following links at the top:

Screenshot_2017-02-08_15-05-57

The URL structure for the Views page makes the most sense as follows (purple = story type contextual filter, orange = featured contextual filter): Read more ›

Tagged with: , ,
Posted in Development

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 want the generated CSV to always be named “mdb_interests.csv” but I want to “backup” the existing “mdb_interests.csv” to “mdb_interests_N.csv” if one already exists. This will ensure that we always have the latest data in “mdb_interests.csv” but will have backups from all previous API pulls. Using some built-in Drupal functions it’s pretty simple: Read more ›

Tagged with:
Posted in Tech Tips

Adding an Inline Style Attribute to an Entity in Drupal 7

The point of this post is to illustrate adding inline styles without creating template files. Normally we add classes via $vars['classes_array']  but sometimes inline styles are required.

This code isn’t too useful as written (make all text red for all entity types, really?), but drop in a conditional to affect specific entity types and replace the styles with something useful like setting a background image URL from a field within the entity and you have a handy snippet.

 

Tagged with:
Posted in Development

Entity Reference Referrer – Getting Entity Reference’s Parent/Referrer Entity ID and Type

Out-of-the-box, the Entity Reference module doesn’t provide a way to access the referrer entity’s fields from within the referenced entity. I have two ways of doing this. The first is to patch the entityreference module (not ideal unless this patch went out to the community via proper channels; perhaps I should get on that?). The second is to mimic entityreference’s “Rendered entity” field formatter but modify it to include the referrer information. I recommend the second method for now. Read more ›

Tagged with: , ,
Posted in Development

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 to commit, and there were hundreds of changes, so it was hard to spot them. I wondered if iTerm2 had a way of highlighting or alerting when a specific word shows up in the terminal. To my surprise I found a “Triggers” section under the “Profiles » Advanced” tab in the settings for the app. iTerm2 really can do everything! Read more ›

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

Microphone Enable/Disable with Alert – Keyboard Maestro Macro

In the past I’ve used Shush to achieve a push-to-talk or push-to-silence setup on my Mac. It works alright but more often than not I forget which mode I’m in, or whether I’m silenced or not. This leads to awkward moments in meetings.

I’ve solved the problem using Keyboard Maestro. This macro, triggered via CTRL-m simple enables or disables the current “input” device (whatever is selected in the Sound preferences) by setting its level to 0 or 100. It’s a toggling macro so you can use the same hotkey to flip between the two states. Most importantly, though, is the nice popup alert that appears when you go into “disabled” mic mode. This window is hide-able if it gets in the way, and it also disappears if you re-enable (via hotkey OR the RE-ENABLE button). You can safely disable the “Custom HTML Prompt” action if you don’t want to see the prompt. Here’s what the popup looks like:

MicDisable

Read more ›

Tagged with: , , ,
Posted in Tech Tips

Appending Language to Menu Items in Menu Admin (Drupal 7)

If you are working with a Drupal 7 menu that contains menu items across multiple languages it is a little cumbersome to see them all on the same screen. Right now we have all of the translations in place (3 nodes per piece of content), but we haven’t translated the titles yet. It’s very hard to see which items will appear for which languages. Imagine if we add 75 more menu items!

2016-08-31_15-01-44

Read more ›

Tagged with: , ,
Posted in Development