Saturday, November 26, 2011

How to Show the User Library Folders in Mac OS X 10.7 (Lion)

By default, Lion hides the user library folders in the Finder. You can still open them by pressing Cmd-Shift-G and typing the folder name in manually, but if you access the folder often, this can prove tedious. Note that thus far, every update (10.7.1 and 10.7.2) has reset the folder flags to hidden, so a simple repeat of the command will make them reappear. Simply type the following into your favourite Terminal, and your user library will appear:
chflags nohidden ~/Library
Also, should you want to make all user libraries visible, use the following:
sudo chflags nohidden /Users/*/Library

Lion defaults tweaks

Many tweaks exist through the Terminal command defaults. Some of those specific to Mac OS X 10.7 have been included in Lion Tweaks, a standalone app. Also, there is a wonderful prefpane called Secrets, but while many of the tweaks available there still work on Lion, it has not yet been updated with new "secrets", so listed below are some of the tweaks I've found:

Disable resume for most Apple applications (replace appName with desired program, i.e. QuickTime, Preview, TextEdit...):
defaults write NSQuitAlwaysKeepsWindows -bool false
Disable new window animation:
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
Disable Mail reply animation:
defaults write DisableReplyAnimations -bool true
Disable Mail send animation:
defaults write DisableSendAnimations -bool true
Disable character picker:
defaults write -g ApplePressAndHoldEnabled -bool false
Use Snow Leopard-style Save dialog shortcuts (i.e. Cmd-D selects "Don't Save"):
defaults write NSGlobalDomain NSSavePanelStandardDesktopShortcutOnly -bool true
Disable iOS-style spelling corrections:
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
Show system info at login screen:
defaults write /Library/Preferences/ AdminHostInfo HostName
Wednesday, November 9, 2011

How to Unstick a Stuck Mac App Store Download

Periodically you may try to install/download/update an app in the Mac App Store (MAS) and it will sit there "waiting" indefinitely. Restarting the MAS doesn't seem to help. What did work for me was the following:
  1. Quit the Mac App Store.
  2. Navigate to /Applications/Utilities/
  3. Open Activity
  4. Search for "storeagent".
  5. Select it, choose "Quit Process".
  6. When asked if you really want to quit the process, choose "Quit".
  7. Open the MAS and try to download the app again.

Note: Before you do this, you can also try holding Option, and it will give you a chance to "Cancel" the download, but this didn't seem to fix the issue for me.
Tuesday, June 28, 2011

Adventures in changing the black navbar in Google

Adding the following user styles to your browser should get it looking clean again:

Make black navbar white and remove navbar's bottom border:
#gbx4 {
background-color: #fffffff;
border-bottom-width: 0px;

Make the top text black again:
#gbg .gbgt {
color: #fff!important

Make the selected item black again:
.gbz0l .gbts {
color: #000;

Also, the settings icon for a white background is part of this:

This isn't everything, but it's a start. Any comments and thoughts are appreciated!
Tuesday, May 3, 2011

Konami Code Javascript implementation

I developed this to navigate my site with various shortcuts. My specific implementation can be seen here, and allows various keypress sequences to go to different pages (try typing "home" right now, for example).

What makes this code unique is that there is no ever-increasing array to check against, thus keeping the runtime memory free as can be. It is also extremely flexible and allows for many codes with no slowdown and minimal tweaking (see my linked code above).

Note that this is not tested with Internet Explorer and likely does not work in said browser.

if (window.addEventListener) {

  //konami keypress code, plus as many other codes as you want
  var keyCodes = [[38,38,40,40,37,39,37,39,66,65]];

  //corresponding page(s) to load if the code is correct
  var urls = [""];

  //tracks state of keypress (starting at 0)
  var states = [];
  for (i=0; i<keyCodes.length; i++) states[i] = 0;

  window.addEventListener("keydown", function(e) {

    for (i=0; i<keyCodes.length; i++) {
      //if the most recent keypress matches, increment the corresponding state,
      //otherwise reset to zero
      if (e.keyCode == keyCodes[i][states[i]]) states[i]++;
      else states[i] = 0;
      //if the state matches the array length, go to page
      if (states[i] == keyCodes[i].length) window.location = urls[i];

  }, true);

Sunday, March 13, 2011

Does the Actiontec GT701R DSL Modem support ADSL2+?

I recently upgraded from 7Mbps to 12 Mbps download from Qwest. My Actiontec GT701R DSL modem had done well thus far (I use a transparent bridge with my Airport Extreme), and after being warned by Qwest that my router probably wouldn't work with the higher speeds, I wasn't too concerned, as I figured I could buy a new one for cheap as necessary (they wanted to charge me $90 for a new one). I did check the product page for any information, and found this in the product FAQ (the poorly-placed comma in the title was there, too):
What is the maximum connection speed, that the Actiontec DSL Gateway support?
The maximum connection speed for an Actiontec DSL Modem or Gateway is 8Mbps downstream and 1Mbps upstream.

However, if the modem or gateway has a firmware update available that would upgrade it to ADSL2 or ADSL2+, then the maximum speed would be higher. The theoretical maximum speed for ADSL2 is 12Mbps and ADSL2+ is 24Mbps. But for ADSL2 or ADSL2+ to provide the higher speeds of which they are capable, the ISP must fully support the ADSL2 and ADSL2+ standard as well.
After perusing the internet for confirmation as to the "theoretical firmware update", I found a few people that posed similar questions but no answers.

A few days later, I awoke to the internet being down. It consistently failed to sync, and after resetting the router, I determined this was likely due to the speed upgrade. My last-ditch effort was to download a firmware update from Qwest (QW06.5- for Mac or Windows). After upgrading, the modem worked like a charm. This should also work with the GT701, as they use the same firmware.

So the answer is yes. If you have an Actiontec GT701R DSL modem with the latest firmware, it can at least support ADSL2+ at 12Mbps.

How to Override "No Ink" Error on a Canon PIXMA MX700

When a Canon PIXMA MX700 runs out of any ink, it prevents you from using it, giving the following error message:

U163: The following ink has run out. Replace the ink tank.
This can be a pain, especially when you want to scan, or if you still have black ink and that's all you need to use. There are two methods that will work to temporarily clear this until you are able to get new ink (which, by the way, is much, much cheaper if you use generic brands). These may also work for other Canon printers, but I haven't tried it. (Update: one or both methods have been confirmed to work on several Canon PIXMA models, including the JX210P, MG5220, MG5270, MG5470, MG6320, MP220, MP280, MP470, MP495, MP560, MP620, MP640, MP970, MP980, MX310, MX882, and MX885; more information might be in the comments. Thanks for the info!)

The first method uses the printer's "factory mode". There are some interesting settings in here, but I'm not sure of what everything does, so be careful with them. This works temporarily (as it seems to reset after a few days), and does not permanently disable ink level detection (as it correctly showed full ink after replacing it):
  1. Unplug the printer.
  2. Press and hold the Power button while plugging the printer back in.
  3. Continue to hold the Power button and press the Reset button twice.
  4. Let go of the Power button and wait 10 seconds. It will eventually show the number 1 on the LCD.
  5. Once the printer also shows "Idle" on the screen, cycle through the settings with the left and right arrow buttons until you see "USER MODE POWER OFF". Press the OK button.
  6. You should now be able to print or scan.
The second method is to simply press and hold the Stop/Reset button for at least five seconds. I didn't find this solution for a while because it's buried deep in the Canon KB, and haven't before used it. Be forewarned that Canon claims this stops the printer from detecting ink levels (I'm not sure if it means for the specific cartridge or as a printer setting).