Tags
array bash benchmark bug chrome cli configuration css diy editorial firefox fixes gotcha grub hack hardware html5 input instance_eval javascript jquery jsperf linux mouse multi touch multitouch nginx opera performance preferences prototype ruby snippet ssh syntax touch pad touchpad trackpad track pad ubuntu udev virtualbox web standards wii windowsCategories
-
Recent Posts
Recent Comments
- Chema Gallego on Clone Ubuntu VMs in VirtualBox
- Ryan Finnie on Compacting a VMDK (Virtual Machine Disk Format image)
- Prevent Virtual Machines from Saving Network Interface udev Rules | splat operator on Clone Ubuntu VMs in VirtualBox
- David on Ruby instance_eval gotcha
- force on Clone Ubuntu VMs in VirtualBox
Archives
Meta
Tag Archives: snippet
Show Duplicate Filenames with Ruby
Here’s a quick one. I want to show just the names of files that have the same basename in a directory. Code require ‘find’ require ‘set’ all_files = [] duplicates = {} basenames = Set.new ARGV.each do |dir| Find.find … Continue reading
Sanitizing File Names with Ruby
At work, I ran into a problem wherein I was copying files from one filesystem (FAT32) to another (NTFS), and there were file names with characters that were legal in the first, but not the second. I wrote a Ruby … Continue reading