Giving Users Style Choice
Sometimes your site’s style doesn’t meet the needs of all your visitors. With some simple PHP and javascript you can provide a different CSS file for users with small screens.
CSS color extracter
This is one of the reasons I love Ruby. I wrote some code that would take a CSS file and print out the unique hex colors, and it was about 10 lines long. I then realized that if I had been thinking in Ruby, I could do it in just one line. This page is OLD and probably contains errors, out of date information, security flaws or other problems. I am keeping it around because it might be helpful to someone. File.readlines(ARGV[0]).to_s.downcase.scan(/#[0-9a-f]{6}/).uniq.sort.each {|one| puts one} if (ARGV[0] != nil) Put that in a Ruby file, and run it with a…Read the Rest