Showing posts with label os x. Show all posts
Showing posts with label os x. Show all posts

Wednesday, August 24, 2011

open list of urls in a bunch of tabs on chrome on os x

I put the urls in a cr-delimited list in a textfile, "url-list.txt".

Initialize a fakey user data dir for Chrome to use:
$ /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/
(Chrome will pop up... pick a search engine and all that nonsense, then hit ctrl+c when done)

Open all the urls in a bunch of tabs:
$ cat url-list.txt | xargs /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/

If you don't specify a user data dir, and you have Chrome open (of course you do) you'll get an "Unable to obtain profile lock" error message. Also, you may want to keep this list of urls separate from your user profile.

If you don't want to keep the urls separate from your user profile, exit Chrome first, and just use:
$ cat url-list.txt | xargs /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

Wednesday, December 8, 2010

hosts.conf on os x

Use sudo vi /etc/hosts on OS X to set custom DNS resolutions, e.g. to test an Apache configuration prior to hostmaster changes. The syntax is just the familiar [ip] [tab] [hostname].

Tuesday, December 29, 2009

can't install mtr in Leopard

I was unable to compile mtr in OS X Leopard, getting these errors on make:

dns.c:242: error: ‘PACKETSZ’ undeclared here (not in a function)
dns.c: In function ‘statmalloc’:
dns.c:318: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘size_t’
dns.c: In function ‘dorequest’:
dns.c:756: error: ‘QUERY’ undeclared (first use in this function)
dns.c:756: error: (Each undeclared identifier is reported only once
dns.c:756: error: for each function it appears in.)
dns.c:756: error: ‘C_IN’ undeclared (first use in this function)
dns.c: In function ‘resendrequest’:
dns.c:769: error: ‘T_A’ undeclared (first use in this function)
dns.c:776: error: ‘T_PTR’ undeclared (first use in this function)
dns.c: In function ‘parserespacket’:
dns.c:866: error: ‘NOERROR’ undeclared (first use in this function)
dns.c:893: error: ‘MAXDNAME’ undeclared (first use in this function)
dns.c:918: error: ‘C_IN’ undeclared (first use in this function)
dns.c:925: error: ‘T_PTR’ undeclared (first use in this function)
dns.c:992: error: ‘T_A’ undeclared (first use in this function)
dns.c:1063: error: ‘NXDOMAIN’ undeclared (first use in this function)
dns.c: In function ‘dns_events’:
dns.c:1129: error: ‘T_PTR’ undeclared (first use in this function)
dns.c: In function ‘dns_lookup2’:
dns.c:1188: error: ‘T_PTR’ undeclared (first use in this function)
make[2]: *** [dns.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2


... the solution was to add "-lresolv" to the LIBS line:
LIBS = -lm -ltermcap -lresolv

inspired by the same issue with php 5.3.0