Today, I was faced with Dropbox 'Error 36' on MacOS.
So, let's start from beginning... Dropbox has file name limitations, and those limitations are a bit different than operating system limitations (MacOSX).
I am convinced that there are good reasons for these, as they have special meaning on the command line level or would look really weird in the browser.
Let's start with the issues:
- Issue 1: File names can not start or end with blank character
- Issue 2: File names should not contain slashes
Where issue 2 is easy to spot, finder does not make it easy to spot issue 1. Thus I have created a short script that fixes blank characters in file names.
You can download dropbox_fix_script.pl. You need to navigate to the folder you are trying to copy, unzip and run this script from terminal.
Before you run this script, make sure to backup your data.
If there are enough interested readers, I may wrap this into application that you can drop a folder on.
--- script content is:
#!/usr/bin/env perl
#
sub fix()
{
my @list = `find .` ;
chomp(@list);
for my $file (@list)
{
print "." ;
my $base = `basename "$file"` ;
my $dir = `dirname "$file"` ;
chomp($base);
chomp($dir);
if( ($base =~ /\s+$/) || ($base =~ /^\s+/) || ($base =~ /\// )
{
print "match $file\n" ;
$base =~ s/\s+$//mig ;
$base =~ s/^\s+//mig ;
$base =~ s/\//_/mig ;
print "\n" ;
return ( $file, "$dir/$base");
}
}
return undef;
}
while( 1 )
{
my ($file, $new_file) = &fix();
if( defined( $file ) )
{
print "rename '$file' '$new_file'\n" ;
if( -f $new_file )
{
print "file already exists $new_file -- fix $file \n" ;
exit ;
}
if( -d $new_file )
{
print "dir already exists $new_file -- fix $file \n" ;
exit ;
}
rename $file , $new_file ;
}
else
{
last;
}
}
Monday, February 7, 2011
Dropbox (Error code -36)
Wednesday, January 26, 2011
DNA reverse complement
Just published simple DNA reverse complement tool. It features reverse sequence generation, complementary RNA and DNA generation and of course reverse complement for both DNA and RNA. Check it out.
Posted by
Ivica Ceraj
at
8:06 PM
0
comments
Labels: complement, dna, reverse complement, reverse sequence, rna
Wednesday, January 19, 2011
Click-o-mania and cyclick-o-mania in pure HTML
Last time I wrote click-o-mania clone was in summer of 1999. I wrote it in an MIT Athena cluster one summer day with the idea that it would help me with, than fresh Java skills.
Now the time has come, and I wanted to work on my GWT skills - thus - new HTML only, Flash-free, Java-free version of Click-o-mania and cyclick-o-mania are available. This simple games are written in using GWT/Java and compiled and tested on Mac and Windows, in variety of browsers and also adapted to work on iPhone. If they work well on Android, I would be interested to hear.
I hope you will enjoy these games as much as I enjoyed writing them.
Wednesday, September 8, 2010
Punnett Square at Bugaco.com
I just started writing Punnett Square calculator. It seems to be a nice tool for understanding inheritance relationships. Check it out at: http://www.bugaco.com/calculators/punnett_square.php
Posted by
Ivica Ceraj
at
8:23 AM
0
comments
Labels: bioinformatics, calculator, on-line calculator, punnett square
Wednesday, March 31, 2010
Eclipse - Linux - Unable to connect to repository
I just moved to new Ubuntu 10.4, and downloading Eclipse or Aptana Studio suddenly stopped working with repositories. This is very very annoying as I'm unable to install pydev and continue working on my improvements of Analytics@bugaco. So, what I had to do something to fix it. It seems that I am not the only one with this problem.
The problem seems to be related to Java's preference to use IPv6 stack over IPv4 stack that causes some systems to be unable to connect to web sites.
Fix for it is documented at debian's bug report's list. The reading is quite verbose, so I'll document cookbook solution that just works for me.
Open your eclipse.ini file, at some stage it has -vmargs line, after that line add following define:
-Djava.net.preferIPv4Stack=true
Original file
-startup plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar --launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520 -product org.eclipse.epp.package.cpp.product -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m -vmargs -Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx256m
New file
-startup plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar --launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520 -product org.eclipse.epp.package.cpp.product -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m -vmargs -Djava.net.preferIPv4Stack=true -Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx256m
Good luck! Let me know if this fixes your problem...
Posted by
Ivica Ceraj
at
7:26 PM
Labels: eclipse, unable to connect to repository eclipse, update site
Sunday, November 15, 2009
Windows 7 on Acer TravelMate C110
Posted by
Ivica Ceraj
at
7:07 PM
30
comments
Labels: windows 7 acer c110 travelmate graphics networking sleep


