Skip to content

Instantly share code, notes, and snippets.

View practicingruby's full-sized avatar

Gregory Brown practicingruby

View GitHub Profile
sjis_str = File.open("file_in_sjis.txt", "r:shift_jis") { |f| f.read }
Prawn::Document.generate("sjis.pdf") do
font "#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf"
text sjis_str
end
sandal:prawn $ rake
Prawn specs: Running on Ruby Version: 1.8.6
............................................................................................................................................................................................................
Finished in 10.222839 seconds.
204 tests, 340 assertions, 0 failures, 0 errors
sandal:prawn $ rake19
Prawn specs: Running on Ruby Version: 1.9.1
Started
sandal:prawn $ rake examples
Running Examples
Ran in 13.546971 s
sandal:prawn $ rake19 examples
Running Examples
Ran in 15.534324 s
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Rock
Paper
Scissors
Shoot!
You: Rock
You: Paper
You: Scissors
Acknowledgements:
Over the course of writing Ruby Best Practices, I was thoroughly supported by
my friends, family, and fellow hackers. I want to thank each and every one of
the folks who've helped out with this book, because it would not have existed
without them.
This book did not have a typical technical review process, but instead was
supported by an excellent advisory board who participated in group discussion
and the occasional review as each chapter was released. These folks not only
@practicingruby
practicingruby / gist:86920
Created March 27, 2009 21:53
ACKNOWLEDGEMENTS
Over the course of writing Ruby Best Practices, I was thoroughly supported by my
friends, family, and fellow hackers. I want to thank each and every one of the folks
who've helped out with this book, because it would not have existed without them.
This book did not have a typical technical review process, but instead was supported
by an excellent advisory board who participated in group discussion and the occasional
review as each chapter was released. These folks not only helped catch technical errors,
but helped me sketch out the overall vision for how the book should come together as
well. Participants included James Britt, Francis Hwang, Hart Larew, Chris Lee, Jeremy McAnally
and Aaron Patterson.
  • Introductions
  • Styling
  • Gravatar?
  • Gray BG for pre?
  • Scheduling
  • Calendar
  • Post to group?
  • Collaborators
  • Out of the box support or wait?
  • Licensing
create_table :customers do |t|
t.string :first_name
t.string :last_name
t.string :email
t.string :daytime_phone
t.string :evening_phone
t.timestamps
end