def spinner
chars = %w{ | / - \\ }
thread = Thread.new { yield }
while thread.alive?
$stdout.print chars[0]
sleep 0.5
$stdout.print "\b"
chars.push chars.shift
end
thread.join
end
spinner do
name=gets
puts name
end
ls | grep -v dir2 | xargs rm -rfv
$('#projects').html("<%= escape_javascript (render 'projects') %>");