It may work, but I don't think it would work efficiently. The two axes of rotation do not intersect, they are far apart which would make the joint bumpy when you spin it at an angle. It would be better if your two pins (nails) were on the same plain. I know you're not going to understand what I just said, because I barely do

but if you look at other u joints, I think you'll know what I mean.