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 ;)

Sunday, April 17, 2011

Blogger "naked domains" on goDaddy

I'm sure that this is a title that Bob Parsons would love.

If you want to host a Blogger blog on a naked domain i.e. "http://mystady.com" vs. "http://www.mystady.com", then mystady has the answer for you: (http://mystady.com/2011/01/solved-blogs-may-not-be-hosted-at-naked.html?showComment=1303072919290#c6469598480890494930).  It definitely works, and here's a screencap of what your goDaddy DNS Manager should look like.

Note that there is no "www" CNAME entry and I had to go to my Google Apps admin page to disable Sites.




Import Posterous to Blogger --fixing bX-q5k3d4

I just recently imported a Posterous blog to Blogger. I thought that Posterous was very convenient with its crosspost capability, iPhone app, and bookmarklet, but the load performance was slow and the site search was broken.

While Posterous also has a convenient import tool to go from Wordpress/Blogger/Tumblr/etc., there's no tool that lets you go from Posterous to Blogger and it required a little bit of a hack to do this due to a "Sorry, the import failed due to a server error. The error code is bX-q5k3d4"

1. Get a Wordpress account and use the Import tool with Posterous.  You'll need to enter your Posterous credentials.

2. Export your Wordpress blog that contains all of your Posterous posts.  Doing this will create an xml file that isn't compatible with the Blogger import tool and gives you that bX-q5k3d4 error code.

3. Use the wordpress2blogger (http://wordpress2blogger.appspot.com/) app to convert the Wordpress.  Note that this app restricts you to files smaller than 1MB.  What you can do is import small portions of your blog with the Wordpress exporter in step 2.

4. Import the fixed xml file via the Settings -> Blog Tools -> Import Blogs tool in Blogger

Monday, March 5, 2007

Surfing at Kalaeloa Beach, aka White Plains

Kalaeloa Beach, aka White Plains, is a great place to learn how to surf. With a military ID, you can rent a board for $5/hr and with a good guide, learn to surf in minutes! Just remember to get the biggest board possible as a beginner and you'll be fine :). Here are the directions to White Plains beach.

1. H-1 West to Kapolei Exit #2
2. LEFT turn going South on Fort Barrette Ave, pass the hospital (right) and school (left)
3. LEFT on Roosevelt Rd, immediately after the abandoned guard shack
4. RIGHT on Coral Sea Rd, fourth RIGHT
5. LEFT on Tripoli St, past the airport on the right--look for the sign to the Shore Shack
6. Park and surf!

Tuesday, October 24, 2006

Turn off/stop/disable Final Showing Markup view in Word

This macro will make MS Word start up in "Final" as opposed to "Final
Showing Markup." It's quite annoying when Final Showing Markup is the
default view--this has to stop/be disabled; I hope that this is
addressed in the next version of Office. Back to the point, this macro
will take you back to the days of Word XP and stop the Final Showing
Markup view before it rears its ugly head.

Final Showing Markup *is* shown by default if changes are tracked on a
document. For example, edit a document of your own, track changes,
then send it to a friend. Even though your friend doesn't want to see
the markup, they *WILL* because it's there. This little VBA macro
makes it so that you won't see the markup by default anymore, and
instead will see the Final (without markup) view.

Just dump these lines into a module in your Normal template (hit
ALT+F11 to start up the Visual Basic Editor, right click Modules under
the -Normal- directory and add a Module). Since the name of this sub
is "AutoOpen," it will execute whenever you open a document.

''''''''' VB Start '''''''''
Sub AutoOpen()
With ActiveWindow.View
.ShowRevisionsAndComments = False
.RevisionsView = wdRevisionsViewFinal
End With
CommandBars("Reviewing").Visible = False
'''OPTIONAL: previous line turns off Reviewing toolbar
End Sub
''''''''' VB End '''''''''

Hope this helps!
jyeee