March 3, 2008 at 2:38 pm
· Filed under Random Things, Ruby
Have you ever had to move a lot of files from a sane filesystem to one that behaves more like FAT? Do these files have “strange” characters in their names, such as ‘:’, ‘?’, or ‘*’? This simple utility can rename these files so that the FAT-invalid characters are replaced with ‘_’. Works great for “fixing” the filenames on your music collection before transferring it to your portable audio player. You can download it here.
#!/usr/bin/env ruby
require 'find'
bad_str = ":<>\\|*?\""
bad_files = Array.new
Find.find(ARGV[0]) do |file|
bad_files.push file
end
# reverse array so bad directories come after the files
bad_files.reverse!
bad_files.each do |file|
basename = File.basename(file)
if basename.count(bad_str) > 0
dirname = File.dirname(file)
new_file = File.join(dirname, basename.tr(bad_str, '_'))
puts [file, ' -> ', new_file].join
File.rename( file, new_file )
end
end
Permalink
October 30, 2007 at 8:20 am
· Filed under Nintendo, Random Things
Sparked by a trip to SuperFresh to get some biscuits for dinner, I came across some huge pumpkins for $3. Thus, I was inspired to create a nerdy pumpkin for Halloween. I did all the carving with my Dremel rotary tool and a dinner knife. To keep it from rotting, I covered it in WD-40.
Read the rest of this entry »
Permalink
October 29, 2007 at 11:06 am
· Filed under C/C++, Openmoko, mokash
Mokash is now an official OpenMoko.org project. I’ve just finished copying the current svn repository over to the openmoko.org repository, and that will be the new official repository. The old repository on my home server will occasionally be updated to match the openmoko.org one, but it probably won’t be very often, so don’t come here looking for it. I still need to move the current tickets and such over to the OMO tracker, but that’s not a high priority. Thanks to this, this project will have higher availability (no more monthly reboots or crashes!) and the opportunity to be seen by a larger amount of OpenMoko users.
Permalink
October 9, 2007 at 9:59 pm
· Filed under Openmoko, mokash
If you’re looking to include mokash into an OpenMoko image, look no further. I’ve completed the first version of the bitbake package files for mokash (and simclist, since no package file exists). They can be found here.
Also, there were definitely some bugs in the version 0.1 that I originally released. Turns out, I forgot to add a lot of source files to Makefile.am, which caused a lot of files to go missing when I ran make dist-gzip to create the archive. I fixed that, and now the archive reflects it, but there were some other show-stopping bugs I ran into on a different test machine regarding locales. The fixes for those problems are not in the archive, but a patch exists (conveniently in the bitbake package files) that will bring the source up to svn revision 61, which also incorporates a few items that were planned for the 0.2 release.
Permalink