QuickTopic (SM) free message boards QuickTopic (SM) free message boards
Skip to Messages
  Sign In to access your topic list  |New Topic |My Topics|Profile
$39 July special! Upgrade to Pro   Customize, show pictures, add an intro, and more:   QuickTopic Pro
Topic: FA:OSX / lazysearch.php
Printer-Friendly Page
About these ads
Who | When
Messagessort recent-bottom    (not accepting new messages)
pbxPerson was signed in when posted  13
11-08-2004 01:20 PM ET (US)
For further info and discussion on lazysearch, see:

http://sf.net/projects/lazysearch/
TheGS  12
10-06-2003 10:26 AM ET (US)
Don't forget the Urban Dictionary. Though racy (and sometimes profane), it's much better for slang terms and phrases. Many of the definitions are quite entertaining.

Uhhh.. on second thought, maybe that shouldn't be a default service in lazysearch after all.

http://www.urbandictionary.com/
http://www.urbandictionary.com/define.php?term=pwn
http://www.urbandictionary.com/define.php?term=we+need+to+talk
http://www.urbandictionary.com/define.php?term=face+time
Paul Bissex  11
09-28-2003 08:55 PM ET (US)
I like the Wikipedia suggestion, and I think I will add in that check for local access too.

Thanks for the great feedback.




--
Paul Bissex <pb@e-scribe.com>
e-scribe.com -- Database-Driven Web Development
talk 413.585.8095 / page 413.290.5510 / fax 413.702.6985
46 Main Street Suite 1 Northampton MA 01060 USA
< replied-to message removed by QT >
TheGS  10
09-28-2003 04:41 AM ET (US)
Edited by author 09-28-2003 04:51 AM
I finally installed it on my iBook and another machine (my main web server) and it works great.

For my iBook, I did made the changes in NetInfo by copying localhost and doing the usual. However, lookupd on the laptop is configured to consult cache, FF, DNS, then NetInfo. So, I also modified /etc/hosts just to be sure.

For the other machine, I wanted to share the functionality with all the other machines on my network, so I added a DNS alias, configured the virtual host appropriately. Then, since I was going to leave it exposed to the Internet, I modified the script to restrict the use of locate and top.

My modifications simply check if $_SERVER['REMOTE_ADDR'] == $_SERVER['SERVER_ADDR'] to see if we're being accessed from the same machine, and using in_array() to check if the $SEARCH_TYPE is in the restricted list. Not so complex that I feel the need to present a patch file.

Works like a charm.

Might I also suggest wp=>Wikipedia?
e.g. http://www.wikipedia.org/wiki/Steve_Jobs
pbx  9
09-21-2003 09:05 AM ET (US)
Excellent suggestions!

I'm sure the output doesn't validate, but that's a good goal.

I'll post here with any updates, but feel free to e-mail me if you'd like to be notified that way.
TheGS  8
09-21-2003 07:11 AM ET (US)
Perhaps a plain-text or gzipped version of the source, so that it can be more easily downloaded and installed? The output of highlight_file() and highlight_string() isn't directly suitable for pasting into vi in a terminal window.

You might want to explain the purpose of the modifications in NetInfo (rather than simply saying that one needs to be comfortable making changes in NetInfo). In the case of my home network, I plan to make this service available to the other machines (regardless of OS or browser), so the appropriate thing for me to do is add an entry in my local DNS zone. The NetInfo trick is still useful for when I travel with my laptop, though.

I haven't actually installed it yet, but it looks very promising. Very good idea.

Does the output of the help page and special commands validate?
pbxPerson was signed in when posted  7
07-18-2003 05:54 PM ET (US)
Edited by author 07-18-2003 06:23 PM
FWIW I've created a page for lazysearch info.
pbxPerson was signed in when posted  6
07-15-2003 07:47 PM ET (US)
Edited by author 07-15-2003 07:50 PM
Please do let me know if you have any feedback on it. I'd love to make the install process a bit easier, for one thing.

What I've been really enjoying about it is that it works automatically and identically in *all* the browsers on my machine (even Lynx!).

Oh, I should warn you, the HTML output for manpages is pretty crappy. I'm just using what grohtml spits out, and it is some fugly stuff. On the other hand, it does quick-and-dirty hotlinking of program names, which makes browsing manpages nicer than in the terminal (but not as nice as in a dedicated GUI manpage viewing app).
Bryan  5
07-15-2003 07:41 PM ET (US)
Sweet!

This is like Mozilla's URL keywords on steriods. I have a couple of bookmarks for Google and VersionTracker searches that do a string substitution in the bookmark URL, but this is one better... mmm. man pages in my browser..
pbxPerson was signed in when posted  4
07-10-2003 01:30 PM ET (US)
Still more updates. New: NWS weather search (city, state or zip); wordlist grep (good for word games), autorefreshing "top" display.
pbxPerson was signed in when posted  3
07-07-2003 03:00 PM ET (US)
Some more updates. HTML manpages can now be viewed like this:

  s/man/foo
pbxPerson was signed in when posted  2
06-30-2003 12:32 PM ET (US)
Edited by author 06-30-2003 12:34 PM
A new feature that can be hacked in at line 117 of the current source (1.5): search your local HD with the Unix utility "locate."

Usage is simply "s/loc/foo"

Code:

if ($search_type == "loc")
 {
 exec (escapeshellcmd ("locate {$query_bits[1]}"), $output);
 foreach ($output as $path)
  {
  print "<a href='file:///$path' style='text-decoration: none'>$path</a><br />\n";
  }
 exit;
 }
pbxPerson was signed in when posted  1
05-21-2003 06:37 PM ET (US)
This is for discussion of my little hack as mentioned on FA:OSX.
RSS link What's this?
QuickTopicSM message boards
Over 200,000 topics served
Learn more Frequently asked questions  Acknowledgements
What they're saying about QuickTopic
 Questions, comments, or suggestions? Contact Us
Read our use policy before beginning. We value your privacy; please read our privacy statement.
Copyright ©1999-2006 Internicity Inc. All rights reserved.