6
Feb
2010
Posted by havvg. No Comments
Lightbox is one great plugin for jQuery. As there is no option to set up relations for links of images to generate galleries of it like thickbox does, you have to call lightBox multiple times to get your galleries up and separated from each other.
A simple call for lightBox looks something like this.
$('#photos .gallery a').lightBox(); |
Imagine you have several separated elements of the class “gallery” nested under the photos node. LightBox will put all of these images in one gallery.
The following code snippet will call lightBox multiple times separating each gallery from all others.
$('#photos .gallery').each(function() {
$('a', $(this)).lightBox();
}); |
19
Oct
2009
Posted by havvg. 1 Comment
Connection refused
I need couchdb 0.10.0 as it provides JSONP support, so I installed the bleeding edge ubuntu Karmic Koala development branch, which ships couchdb 0.10.0. But when doing a simple curl request on the couchdb server, the connection was refused.
$ curl -vX GET http://127.0.0.1:5984
* About to connect() to 127.0.0.1 port 5984 (#0)
* Trying 127.0.0.1... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host |
To check what’s wrong use this command.
$ sudo -u couchdb couchdb
=ERROR REPORT==== 19-Oct-2009::21:49:09 ===
file:path_eval([".","/root"],".erlang"): permission denied
Apache CouchDB 0.10.0 (LogLevel=info) is starting.
Apache CouchDB has started. Time to relax.
[info] [<0.1.0>] Apache CouchDB has started on http://127.0.0.1:5984/ |
What’s important on this output is the permission denied error. In order to get this solved, you can either change the log section in your /etc/couchdb/local.ini to a logfile couchdb is allowed to write to or you add the directory and the file with correct permissions that is defined in the /etc/couchdb/default.ini as follows.
$ mkdir -p /var/log/couchdb/0.10.0/
$ touch /var/log/couchdb/0.10.0/couch.log
$ chown -R couchdb:adm /var/log/couchdb/ |
Now the logfile is setup correctly and you may request couchdb.
$ curl -X GET http://127.0.0.1:5984
{"couchdb":"Welcome","version":"0.10.0"}
$ curl -X GET http://127.0.0.1:5984?callback=fnName
fnName({"couchdb":"Welcome","version":"0.10.0"}); |
Thanks to a lot of mail archives, that pointed me to what could be wrong (and finally I got it :D).
4
Sep
2009
Posted by havvg. 20 Comments
I upgraded to Snow Leopard on my Mac and as described on Apple’s website Parallels 3.0 won’t start on Snow Leopard. At least not by default. However it is possible to start Parallels 3.0 under Snow Leopard without updating anything. As there are some good reasons given, that lead to this result, use the following steps at your own risk. I haven’t experienced any problems with these steps, but who knows?
Read the rest of this entry »