Public Gists by sandal

Gravatar
Sat Oct 24 08:59:02 -0700 2009
1
2
3
acc += (e.is_a?(Hash) && e.has_key?(:colspan)) ? e[:colspan] : 1
 
cell_text = cell.is_a?(Hash) ? cell[:text] : cell.to_s
Gravatar
Sat Oct 24 08:55:08 -0700 2009
1
2
3
IMAGE_TYPES = %w( image/jpeg image/png image/pjpeg image/x-png image/gif )
validates_attachment_content_type :image, :content_type => IMAGE_TYPES
 
Gravatar
Sun Aug 30 11:19:23 -0700 2009
1
2
3
require "prawn/core"
 
class Prawn::Document
Gravatar
Sun Aug 30 10:44:11 -0700 2009
1
2
3
require "prawn/core"
 
class Prawn::Document
Gravatar
Fri Aug 28 05:35:54 -0700 2009
1
2
3
    def build_jpg_object(data, jpg)
      color_space = case jpg.channels
      when 1
Gravatar
Fri Aug 28 05:00:43 -0700 2009
1
2
3
RGhost::Document.new do |doc|
  doc.matrix_grid do |g|
    g.column 'row'
Gravatar
Fri Aug 28 04:56:44 -0700 2009
1
2
3
@data=[
  { "row" => '1', "name" => "Gandalf", "race" => "Human" },
  { "row" => '2', "name" => "Bilbo", "race" => "Hobbit" },
Gravatar
Fri Aug 28 04:29:10 -0700 2009
1
2
3
Prawn::Document.generate("raw_lines.pdf", :skip_page_creation => true) do
  # SET UP A PAGE
  @page_content = ref(:Length => 0)
Gravatar
Fri Aug 07 04:35:02 -0700 2009
1
2
3
module RAAWS
  ONE_NECESSARY_SEARCH_PARAM =%w<
Actor Artist AudienceRating Author
Gravatar
Wed Jul 22 10:33:09 -0700 2009
1
2
3
diff --git a/test.pdf b/test.pdf
index 2cd671f3d193f628a4e75411d07d1c7bfe78187b..139357ebffc87a199591f626c8fd956dc2bb24d4 100644
GIT binary patch
Gravatar
Thu Jun 18 21:41:05 -0700 2009
1
2
3
body {
  font-family: Gill Sans;
  font-size: 20px;
Gravatar
Sun Jun 07 18:30:34 -0700 2009
1
2
3
set vb t_vb=
set nobackup
set nowritebackup
Gravatar
Sat May 30 02:10:29 -0700 2009
1
2
3
require "java"
require "rubygems"
require "flying_saucer"
Gravatar
Fri May 29 07:57:44 -0700 2009
1
2
3
API = ffi_builder("C:/Windows/pcmsvr32.dll") do
  short :PCMSOpenServer, [:int, :int]
  int :PCMSCloseServer, [:short]
Gravatar
Fri May 29 07:49:35 -0700 2009
1
2
3
/* Initialize the server engine. The arguments are currently not used. */
/* Returns a unique ID for this server engine connection. */
short PCMSOpenServer(int hAppInst, int hWnd);
Gravatar
Fri May 29 07:39:44 -0700 2009
1
2
3
module API
  extend FFI::Library
  ffi_lib "C:/Windows/pcmsrv32.dll"
Gravatar
Fri May 29 07:39:42 -0700 2009
1
2
3
module API
  extend FFI::Library
  ffi_lib "C:/Windows/pcmsrv32.dll"
Gravatar
Thu May 28 09:58:56 -0700 2009
1
2
3
if RUBY_VERSION < "1.9"
  def ruby18
    yield
Gravatar
Wed May 27 11:27:13 -0700 2009
1
2
3
require "ffi"
 
module MilesDavis
Gravatar
Fri May 15 10:11:56 -0700 2009
1
2
3
# COMMUNITY CHALLENGE
#
# How would you test this Quiz#problem method? No mocks/stubs allowed.