Skip to content

Instantly share code, notes, and snippets.

View eticzon's full-sized avatar

Erwin eticzon

  • Sydney, Australia
View GitHub Profile
#!/usr/bin/env ruby
require 'rubygems'
require 'image_optim'
image_optim = ImageOptim.new
ARGF.each_line do |line|
file = line[0..-2] # Strip newline
if File.exists?(file) && File.file?(file) && File.extname(file) =~ /(.jpg|.jpeg|.png)/