Skip to content

Instantly share code, notes, and snippets.

View Whoops's full-sized avatar

Walton Hoops Whoops

View GitHub Profile
@Whoops
Whoops / dup.rb
Created May 24, 2011 22:34
Demonstration of shallow copy
require 'pp'
class DupMe
attr_accessor :stuff
def initialize
@stuff=[1,2,3,4,5,6]
end
def copy
new = self.dup

Keybase proof

I hereby claim:

  • I am whoops on github.
  • I am whoops (https://keybase.io/whoops) on keybase.
  • I have a public key whose fingerprint is 0281 C082 B629 25AE 2532 B187 E772 87E0 1F77 E2E5

To claim this, I am signing this object:

@Whoops
Whoops / corrupted.txt
Last active August 29, 2015 14:05
nfs wierdness 2
@Whoops
Whoops / demo.rb
Created September 2, 2014 16:02
Prawn_rails explanation
require 'prawn'
# NOTE: this file won't actually run
# How the prawn documentation is written:
# provides a block without an argument,
# recognized methods are implicity called
# on the resulting PDF
Prawn::Document.generate("demo.pdf") do
move_cursor_to 50