top bar
QuickTopic free message boards logo
Skip to Messages

TOPIC:

FA:OSX / lazysearch.php

(not accepting new messages)
13
pbxPerson was signed in when posted
11-08-2004
01:20 PM ET (US)
For further info and discussion on lazysearch, see:

http://sf.net/projects/lazysearch/
12
TheGS
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
11
Paul Bissex
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 >
10
TheGS
09-28-2003
04:41 AM ET (US)
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
Edited 09-28-2003 04:51 AM
9
pbx
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.
8
TheGS
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?
7
pbxPerson was signed in when posted
07-18-2003
05:54 PM ET (US)
FWIW I've created a page for lazysearch info.
Edited 07-18-2003 06:23 PM
6
pbxPerson was signed in when posted
07-15-2003
07:47 PM ET (US)
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).
Edited 07-15-2003 07:50 PM
5
Bryan
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..
4
pbxPerson was signed in when posted
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.
3
pbxPerson was signed in when posted
07-07-2003
03:00 PM ET (US)
Some more updates. HTML manpages can now be viewed like this:

  s/man/foo
2
pbxPerson was signed in when posted
06-30-2003
12:32 PM ET (US)
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;
 }
Edited 06-30-2003 12:34 PM
1
pbxPerson was signed in when posted
05-21-2003
06:37 PM ET (US)
This is for discussion of my little hack as mentioned on FA:OSX.