Jose Nazario

a 30-something technologist who used to be a biochemist. now i travel the world helping people secure their networks. all from ann arbor, mi.

here you'll find my blog, projects, pictures, my wiki, and much more. what you wont find is a strong set of design skills.


 Recent Blog Posts

RSS 2.0


things i did over my vacation

3 week vacation ending today ... thing i did:

now i need a real vacation!

     [link]      Sunday, Jan 04, 2009 @ 11:57am

----


oops command lives

years ago i saw my dad working in a terminal and i could have sworn i typed "oops " when he made a typo and it worked: the command was fixed and rerun, he didn't need to retype the whole thing. i always wanted the oops command.

however, it didn't exist, or at least as i knew it. so i wrote a portable version of it (it seems it exists in zsh, a shell i just don't use). the python part of it is really simple, just a levenshtein distance calculator and a replacement engine. you need to create a command alias for it however:

ksh, sh, bash:

$ alias oops='history>/tmp/oops_history && ~/bin/oops.py'
csh and derivatives:
% alias oops 'history > /tmp/oops_history && ~/bin/oops.py'
here's a brief example of it in action:
$ emacss ~/bin/oops.py
ksh: emacss: not found
$ oops emacs
[ emacs opens and voila, working ... ]
i make a lot of typos and rather than cutting, pasting, fixing the line this makes it easier. some bugs and limitations: let me know if you're interested in playing around with it.

     [link]      Monday, Nov 17, 2008 @ 11:27am

----


translate button

i work with a lot of foreign language websites, most in languages i do not read. to help me with that i often use google translate. but, i got sick of copying and pasting URLs or text, so i built this translate button for firefox.

it works like this: when you're on a page and you want to translate it, surf to the "translate" bookmark (i've located mine in the bookmark toolbar folder in ffox). poof, automagically translated into english. the magic is that the bookmark is javascript that will construct the proper URL for your current page as a target of google translate, and then surf you there. voila.

make a "translate" bookmark and make this the "location" in its properties. now you, too, can have a translate button.

javascript:var h = escape(location.href); 
           newurl = 'http://translate.google.com/translate
?u=' + h + '&hl=en&ie=UTF-8&sl=*&tl=en';
           document.write(newurl);
           window.location = newurl;
paste that code in. simple as that. if you need to change the target language you can change "tl=en" to another laguage (e.g. "es" or "fr"). the source language is automatically determined by google translate (see "sl=*").

     [link]      Sunday, Oct 26, 2008 @ 07:16pm

----

 Recent Wiki Changes

wiki:payloadrecoveryscript on Tuesday, Nov 17, 2009 @ 03:24am
wiki:recipes on Tuesday, Mar 31, 2009 @ 08:58pm
phishingcorpus on Wednesday, Oct 01, 2008 @ 10:01pm
wiki:wild_blueberry_tart on Sunday, Sep 14, 2008 @ 04:43pm
wiki:cold_potato_salad on Thursday, Sep 04, 2008 @ 12:07pm
wiki:recipes on Thursday, Sep 04, 2008 @ 12:06pm
wiki:almond_cookies on Thursday, Sep 04, 2008 @ 12:06pm
wiki:recipes on Thursday, Sep 04, 2008 @ 12:05pm
wiki:peach_galettes on Thursday, Sep 04, 2008 @ 12:05pm
wiki:recipes on Thursday, Sep 04, 2008 @ 12:04pm
----

copyright © 2003-2009 jose nazario, all rights reserved.