12 2007 档案

摘要:This is a Ruby on Rails controller that produces PNG barcode images using RMagick (http://rmagick.rubyforge.org/) and Gbarcode (http://gbarcode.rubyforge.org/), the Ruby Gnu Barcode ( http://www.gnu.o... 阅读全文
posted @ 2007-12-07 17:32 evilyzou 阅读(689) 评论(0) 推荐(0)
摘要:#!/bin/sh curl -O http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz tar xzvf freetype-2.3.5.tar.gz cd freetype-2.3.5 ./configure --prefix=/usr/local make sudo make install cd .... 阅读全文
posted @ 2007-12-07 17:32 evilyzou 阅读(232) 评论(0) 推荐(0)
摘要:These are basic models that store a file in a dedicated files table. Use has_one or has_many to associate this with your actual models. RMagick is required for images. This is my first code dealing... 阅读全文
posted @ 2007-12-07 17:32 evilyzou 阅读(167) 评论(0) 推荐(0)
摘要:require 'RMagick' class PhotoController [...snip...] def render_resized_image @photo=Photo.find(@params["id"]) maxw = @params["width"] != nil ? @params["width"... 阅读全文
posted @ 2007-12-07 17:32 evilyzou 阅读(79) 评论(0) 推荐(0)
摘要:require 'RMagick' maxwidth = 120 maxheight = 160 aspectratio = maxwidth.to_f / maxheight.to_f imgfile = 'world' pic = Magick::Image.read(imgfile + '.jpg').first imgwidth = pic.columns imgheight = pi... 阅读全文
posted @ 2007-12-07 17:32 evilyzou 阅读(148) 评论(0) 推荐(0)
摘要:let's undo some of the damage (just in case): sudo apt-get remove --purge librmagick-ruby-doc librmagick-ruby1.8 Next let's get the version we need: sudo apt-get install libmagick9-dev ruby1.8-dev... 阅读全文
posted @ 2007-12-07 17:32 evilyzou 阅读(210) 评论(0) 推荐(0)
摘要:I go on a lot of Bulletin Board, every has its own limits of size for the avatars, instead of the resize manually I created a script which does it for me with RMagick #!/usr/bin/ruby require "RMagic... 阅读全文
posted @ 2007-12-07 17:32 evilyzou 阅读(126) 评论(0) 推荐(0)
摘要:This is a small ruby file I wrote to process the TCX file that I can download from MotionBased website that is processed from the data off my Garmin Forerunner 305. It processes the XML file and gene... 阅读全文
posted @ 2007-12-07 17:32 evilyzou 阅读(222) 评论(0) 推荐(0)