bash history & completion tips

This is an oldie… bind the up and down arrow keys to searching `bash` history:

UPDATE:

The post below shows the old method… Here’s an updated version:


# make bash autocomplete with up arrow
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'

# make tab cycle through commands instead of listing
bind '"\t":menu-complete'

http://www.macosxhints.com/article.php?story=20031026174236860

Type this into vi ~/.bash_profile, and in place of

<up>

type control + v, then up arrow. In place of

<down>

type control + v then down arrow. (Control V tells vi to put the next character in the doc, rather than just moving up when you press up arrow etc.)


bind '"<up>":history-search-backward'
bind '"<down>":history-search-forward'

Then close all Terminal windows, and quit the app, then open Terminal again and you should have the feature.

also…

PS, don’t forget to add these to your .inputrc while you’re at it:
set show-all-if-ambiguous on
set completion-ignore-case on

Test your web design in different browsers – Browsershots

Test your web design in different browsers – Browsershots
Browsershots makes screenshots of your web design in different browsers. It is a free open-source online service created by Johann C. Rocholl. When you submit your web address, it will be added to the job queue. A number of distributed computers will open your website in their browser. Then they will make screenshots and upload them to the central server here.

Dreamweaver: Configuring Third-Party File Compare (aka `diff`)

Adobe – Developer Center : Configuring Third-Party File Compare

This article gives step-by-step instructions to enable the ‘Compare with Remote’ menu item (for Mac & Windows ;-) . It also provides information on where to get and configure file comparison: WinMerge (Windows) and FileMerge (Mac).

NOTE: FileMerge is available free via Mac OS X Developer Tools XCode package, available from http://developer.apple.com/ (free registration).

StorageMojo » Everything You Know About Disks Is Wrong

StorageMojo » Everything You Know About Disks Is Wrong
Everything You Know About Disks Is Wrong
February 20th, 2007 by Robin Harris in Enterprise, Clusters

Which do you believe?

* Costly FC and SCSI drives are more reliable than cheap SATA drives.
* RAID 5 is safe because the odds of two drives failing in the same RAID set are so low.
* After infant mortality, drives are highly reliable until they reach the end of their useful life.
* Vendor MTBF are a useful yardstick for comparing drives.

According the one of the “Best Paper” awards at FAST ‘07, none of these are backed by empirical evidence.

Mystery Bug – css-discuss

The article below outlines a useful technique in identifying and resolving CSS ‘bugs’ and other problems.

From the article overview:

Mystery Bug – css-discuss
CSS bugs can be obscenely difficult to isolate, especially when they are located amidst a large, complex page with many external style sheets. Compounding this is the fact that few coders have enough experience to be sure that what they’re seeing really IS a bug, and not just incorrect coding.

Often people will, when facing the Mystery Bug, just thrash about almost blindly, and only by pure luck will the answer be found. This need not be.

By following the procedure below, a clear understanding of the problem may be quickly obtained, freeing the coder to find a workaround or avoid the bug altogether.

A couple of useful WebDev links…

I thought I’d post a couple of links to some WebDev sites & tools I use every day…

FireFox Extensions

Most of these are available on Mozilla’s Recommended Addons site.

  • Web Developer – Powerful Web Development tools for outlining DIVs, TABLEs, CSS, etc.
  • User Agent Switcher – change the User Agent on a site or page (pretend your MSIE 6 or 5)
  • Firebug – edit, debug, and monitor CSS, HTML, and JavaScript live in any web page…
  • GreaseMonkey – customize pages & sites by adding your own ‘user scripts’
  • AdBlock Plus – block ads & flash
    NOTE: If you need to show blocked ads (i.e., you need to see/test OAS ads -D ), there’s an ‘ABP’ button next to the Google search bar (looks like a red or green stop sign). Click the little disclosure triangle next to the ABP button, and choose ‘Disable on [site-url]’. If you need help, just ask!
  • FlashGot – File/Image/Link downloader
  • Fasterfox – page load timer (right-side of statusbar)

CSS Resources

  • AlistAPart.com – A great place for learning & pilfering^H^H^H experimenting with CSS techniques.
  • meyerweb.com/eric/css – Eric Meyer’s CSS site
    • CSS Edge – life on the edge!
    • …there’s much more here…
  • SelectORacle – a nifty online tool for learning how CSS2 & CSS3 selectors work
  • Rijk’s panelizer – adds W3C’s CSS & HTML specs to your Mozilla Sidebar
    • Just download the panelizer.zip, place it somewhere handy & unzip it. Then open the included ‘panelizer.html’ file, and click ‘Add Panel’. I created a ‘Sidebars’ bookmark folder in my Bookmark Toolbar, and placed the ‘bookmarks’ in there.

Mac Tools

NOTE: The following contains Mac-only tools. If you are afraid of Macs, or have aversions to heights, please close your browser now. This message will self-destruct in five seconds. Good luck team!

Need help with any of the above? Just ask!