Saturday, December 8, 2012

No audio from Thunderbolt to HDMI

I recently bought a Belkin mini DisplayPort Thunderbolt-to-HDMI cable so I could watch videos played on a MacBook Air on my TV. Unfortunately, while video played on the TV, there was no audio. Video played, but there was no sound.



To get audio, I followed the instructions on this page: http://www.justanswer.com/mac-computers/5kqkc-no-sound-youtube-sound-everything-else-i-e.html.

The instructions from the wise Mac Druid were to delete the Macromedia folder: ~/Library/Preferences/Macromedia

Open up the Terminal app and type these two commands:

cd ~/Library/Preferences
rm -rf Macromedia/

Saturday, November 17, 2012

Growl notification trigger not opening app or having no reaction on click

Growl is a great way of being politely notified of system events in OSX. I recently upgraded and bought Growl on the app store, and like many other users, I had problems like:
"Clicking notification doesnt open the app that triggered the notification"
or
"zero reaction on clicks when a new notification pops up"
I had this problem because I had a previous version of Growl before upgrading.

To restore this very handy functionality, install the Growl Version Detective (http://growl.info/downloads#generaldownloads currently 1.2.2) and upgrade the Framework version on your app like shown below.

After updating the Framework version for iTerm and Adium, I was able to click on the Growl notification and have that action restore the focus to the respective applications.




Select your app and click "Upgrade FW"







Tuesday, April 24, 2012

Change OSX volume keyboard shortcut

There isn't a way to customize the keyboard shortcut to increase or decrease (i.e. change) the volume in OSX. That's unfortunate, because it's difficult to hit the fn button in the far bottom left of the keyboard and the F12 button in the far upper right of the keyboard if you're holding a beautiful baby like Bronwyn Massey.

This article provides instructions on how to make your own keyboard shortcut to change the volume on your mac with Applescript and Quicksilver. Since Applescript comes with OSX, you'll only need to download Quicksilver (http://qsapp.com/). Quicksilver is a very handy app that helps you quickly launch programs and has a global hotkey feature for free (vs. Alfred that requires you to buy their powerpack).

1. Get the Applescript code here or in my GitHub repo (https://github.com/jwsy/ChangeVolumeApplescript) and paste it into the Applescript Editor. You'll have to repeat these steps for each individual script.     
 2. Test the code by hitting the Run button. You should see the syntax highlighting and a growl notification in the upper right. If you don't have growl, just delete lines 6-12.

3. Save the script with File Format: Application. You'll need to move the resulting DVolume.app into the /Applications/Utilities folder or somewhere that Quicksilver will index in its catalog. OSX might prevent you from saving directly to /Applications/Utilities, so you might have to save to your desktop first and then copy it to /Applications/Utilities.

4. Finally, open your Quicksilver preferences and create a new HotKey (i.e. keyboard shortcut) in the Triggers tab.

Creating a keyboard shortcut is easy in Quicksilver ^_^
 

I set the keyboard shortcut to option+F3. Note that I'm using my F keys as standard function keys as shown below in the Keyboard settings. If you don't have this checked below (no check is the default setting), you can set the shortcut to fn+F3.

Saturday, March 10, 2012

cd to iTerm2

iTerm2 (http://www.iterm2.com/) is the best terminal app that OSX has and is loaded with great features including awesome search, built-in autocomplete, mouseless copy, and the very visually cool Instant Replay.

When I want to open the Finder folder I'm viewing in iTerm, use Quicksilver to launch this app by Stefan van den Oord: http://code.google.com/p/iterm2/wiki/AppleScript#Example_of_"cd_to"_command. This works perfectly except when I have a folder with an exclamation mark in it, so I made a small change to the below code so that it sends a ' instead of a \".

Steps to install from the Google Code page:

  1. Open "AppleScript Editor" (/Applications/Utilities)
  2. In a new document, paste the AppleScript code you'll find below
  3. Save the script to your desktop, name it "cd to", use the file format "Application" (do not select "run only" if you want to be able to change the script later on)
  4. Give the script a nice icon if you want
  5. Drag the script you saved in /Applications/Utilities into the toolbar of any Finder window

Monday, January 9, 2012

Codecademy - Functions in Javascript Lesson 2 - Argument Types, part 1

I just had a nice little hour of fun with Codecademy but wound up taking too much time on this problem: http://www.codecademy.com/courses/functions_in_javascript/1#!/exercises/2

Here's a hint (and then an answer) to help you figure this one out.  The unstated goal is to see the output of cube("test"). How can you do that?

Highlight the lines below for some additional help:

Perhaps you could send the results of that call to the console log?


Line 6 in the example shows how to put the output of cube(5) in the console ;)