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
-
add-on amazon rds applescript cocoa css firefox gmail javascript jquery mac mamp mashup mongo mysql oauth Open Tab-History In New Tab pear php skype social SweetCatcher twitter vim
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
-
Recent Posts
-
Blog under the Creative Commons Attribution 3.0 License
Category Archives: Uncategorized
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
git post-receive-email with php using GMail SMTP