Category Archives: Uncategorized

git post-receive-email with php using GMail SMTP

Hosting SMTP myself is a bit high cost. It’s a good solution to use GMail SMTP server. I changed post-receive-email a bit. send_mail() { # if [ -n "$envelopesender" ]; then # /usr/sbin/sendmail -t -f "$envelopesender" # [...]
Posted in Uncategorized | Leave a comment

Call a method of object with string in JavaScript

var call_user_func = function(obj, method) { return eval('obj.' + method).apply(obj, Array.prototype.slice.call(arguments, 2)); } var test1 = { method1: function(arg1, arg2, arg3) { return alert(arg1 + arg2 + arg3); } } call_user_func(test1, 'method1', 1, 2, 3); It works on Firefox3, Safari4, IE6.
Posted in Uncategorized | Leave a comment

screencapture doesn’t work on GNU screen

While using screen screencapture command doesn’t work well. It creates only a black image file. % screen % screencapture ~/Desktop/desktop.png // it doesn't work % exit % screencapture ~/Desktop/desktop.png // it works! Mac OS 10.5.7
Posted in Uncategorized | Leave a comment
  • About

    I'm Nobu, a web developer living in Mountain View, CA. Feel free to comment on any posts. I'm also tweeting on twitter.

  • Archives

  • Recent Posts