Ben Lobaugh Online


Category: Computing Tips (Page 1 of 7)

Mute and unmute your mic quickly with this Alfred Workflow

I am on a lot of calls for work every day and juggle several different call applications. Finding the apps mute/unmute button quickly gets tedious. On some apps the UI is so poorly designed as to make toggling the mic nearly unusable.

Enter Alfred! Alfred is an amazing productivity app. Alfred let you run custom commands and hotkeys in custom Workflows.

I created a Workflow that, once installed, allows you to mute and unmute your mic with the command-M hotkey.

To install simply download the Workflow and double click it to load it into Alfred.

Click here to download the Mic PTT Alfred Workflow

The Workflow is on Github! If you have ideas for improvements create a fork and send them to me:

Bash script to automatically convert git submodules to regular files

Git submodules drive me batty! They are a great idea in theory however in practical application they are a pain in the butt to work with.

I have a project that has accumulated over a dozen submodules over the past couple years. Switching branches and merging anything has become excruciating. This morning was the last straw. I WANT THEM GONE! Removing dozens of submodules by hand is time consuming so I tossed together this quick Bash script. I hope it is helpful to anyone else out there struggling with git submodules.


# Get a list of all the submodules
submodules=($(git config --file .gitmodules --get-regexp path | awk '{ print $2 }'))

# Loop over submodules and convert to regular files
for submodule in "${submodules[@]}"
   echo "Removing $submodule"
   git rm --cached $submodule # Delete references to submodule HEAD
   rm -rf $submodule/.git* # Remove submodule .git references to prevent confusion from main repo
   git add $submodule # Add the left over files from the submodule to the main repo
   git commit -m "Converting submodule $submodule to regular files" # Commit the new regular files!

# Finally remove the submodule mapping
git rm .gitmodules

Find largest files in a directory using the terminal

If you need to find out what the largest files are in a directory and subdirectories here is a command you can run that will find the top 5 largest files.

find . -type f | sed 's/.*/"&"/' | xargs ls -Slh | head -n 5


  1. find . -type f: Find all files in this directory and below
  2. sed ‘s/.*/”&”/’: Put double quotes around the files. xargs can handle this itself, however not all implementations do, this method is safer.
  3. xargs ls -Slh: Using the filenames from 1 list them all sorted by size.
  4. head -n 5: Show the output of the first 5 rows. Which becomes the 5 largest files because ls sorted the output.

Fix “frozen” Evernote app when fullscreen on OS X

The Problem:

When you start Evernote it goes into fullscreen mode. You are not able to use any features of Evernote and hear the “Do not click me” error sound.

The Cause:

There is some sort of message box that has popped up. You need to close this before using Evernote, however it has popped up BEHIND the app and you cannot get to it.

The Resolution:

As strange as this sounds, the following steps work.

  1. Kill Evernote – If need be use the option+command+esc keystroke
  2. Disable all active network connections
  3. Re-open Evernote
  4. Switch Evernote out of fullscreen mode
  5. Close Evernote
  6. Enable network connections
  7. Open Evernote
  8. Deal with popup message

List size of directories in the current folder in terminal

If you would like to list the size of all the directories in your current folder run the following command:

du -a -h --max-depth=1 | sort -hr

This will provide output similar to

69M     .
36M     ./plugins
16M     ./.git
14M     ./themes
3.4M    ./uploads
8.0K    ./.DS_Store
4.0K    ./upgrade
4.0K    ./.revision
4.0K    ./index.php

Page 1 of 7

Powered by WordPress & Drip City Coffee