9.19.2007

safari's web inspector

i usually use firefox when i'm working with xhtml/css because it renders consistently and the dom inspector is pretty handy. the rest of the time i use safari, so i end up switching back and forth a lot. while i was working, i ran across safari's new web inspector and it is awesome. there's probably some similar plugin for firefox (i don't really do web stuff often enough to find out), but this little addition gives me one less reason to ever move away from safari...

install cert

because it was one of my most accessed posts from the old blog, i thought that i'd repost it here.

i've done a fair amount of fighting with trusted certificates in java and it's a big pain. luckily, Andreas Sterbenz made this really useful little tool that accesses a site and adds it to a keystore automatically. the only downside was that it was written for java 1.5 and can't be used with earlier versions.

it only took a couple minor changes to allow the utility to work with 1.4 and now i've got it packaged into an executable jar. it's attached to this entry... just execute java -jar install-cert-1.0.jar to see some usage instructions. enjoy.

by the way, the original file made reference to a license that i couldn't find. i'm assuming that since he only posted the source it could be modified and redistributed. if it turns out that there are any issues, somebody please let me know and i'll be glad to remove this post.

download it here

nifty ajax search

i ran across google ajax search and thought that it'd be a great way to add search to this blog. here's what i wanted:

  • results scoped only to this blog
  • optional full google search results as well
  • no modification to the blogger template

here's how i got it:

  1. sign up for a key
  2. add an "HTML/JavaScript" page element to the blog
  3. give it a title and set the content to:
    <script src="http://www.google.com/jsapi?key=$YOUR_KEY" type="text/javascript"></script>
    <script type="text/javascript">
        google.load("search", "1");
    
        function OnLoad() {
    
          var searchControl = new google.search.SearchControl();
    
          var siteSearch = new GblogSearch();
          var options = new GsearcherOptions();
          options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);
          siteSearch.setUserDefinedLabel("this blog");
          siteSearch.setSiteRestriction("$YOUR_BLOG_ADDRESS");
          searchControl.addSearcher(siteSearch, options);
         
          siteSearch = new GwebSearch();
          options = new GsearcherOptions();
          options.setExpandMode(GSearchControl.EXPAND_MODE_CLOSED);
          siteSearch.setUserDefinedLabel("web");
          searchControl.addSearcher(siteSearch, options);
    
          searchControl.draw(document.getElementById("searchcontrol"));
        }
        google.setOnLoadCallback(OnLoad);
    </script>
    <div id="searchcontrol">Loading...</div>

as long as you replace $YOUR_KEY with the key you got in step one and $YOUR_BLOG_ADDRESS with the address of your blog, you should have search that's exactly like the search on this page. enjoy.

9.15.2007

moving to the cloud

as time goes on i find myself more and more compelled to move content to the cloud. as much as i like being autonomous, i'm getting sick of the effort that i have to put in to making it all work. so, today i push a little more responsibility somebody else's way. thanks blogger.