Skip to content

Instantly share code, notes, and snippets.

Meagan Waller meaganewaller

Block or report user

Report or block meaganewaller

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am meaganewaller on github.
  • I am meaganwaller (https://keybase.io/meaganwaller) on keybase.
  • I have a public key ASCez8mp9friD11UGg3C9YV-xMJYjQslump7SAVHh5xUBwo

To claim this, I am signing this object:

View file_connection.R
myConnection <- file("foo.txt", "r")
data <- read.csv(myConnection)
close(myConnection)
# the same thing as
data <- read.csv("foo.txt")
View data_frames.R
x <- data.frame(x = 1:3, y = c(F, T, T))
#=> x y
# 1 1 FALSE
# 2 2 TRUE
# 3 3 TRUE
nrow(x)
#=> [1] 3
ncol(x)
#=> [1] 2
View example.rb
hash = {
a: 1,
b: 2,
c: {
d: 3,
e: {
f: 4
},
g: 5
}
View creating_arrays.rb
array = []
#=> []
array = Array.new
#=> []
@meaganewaller
meaganewaller / _modal_action.html.erb
Created Jan 7, 2015
bootstrap modal not working :(
View _modal_action.html.erb
<div class="modal-header">
<!-- modal body & stuff goes here -->
</div>
@meaganewaller
meaganewaller / 1.rb
Created Jan 1, 2015
Launching a JRuby Application with Heroku
View 1.rb
ruby '1.9.3', engine: 'jruby', engine_version: '1.7.6'
@meaganewaller
meaganewaller / Gemfile.rb
Created Jan 1, 2015
sinatra and datamapper
View Gemfile.rb
# Gemfile
source "https://rubygems.org"
gem "sinatra"
gem "data_mapper"
gem "dm-postgres-adapter"
gem "pg"
group :test do
@meaganewaller
meaganewaller / shapes-2.rb
Created Jan 1, 2015
liskov substitution principle
View shapes-2.rb
shapes = [Square.new, Rectangle.new]
def set_rectangle_width(shapes)
shapes.each do |shape|
shape.width = 5
shape.height = 6
end
end
View 1.rb
>> vowels = [ "a", "e", "i", "o", "u"]
>> vowels[0]
=> "a"
>> vowels.size
=> 5
You can’t perform that action at this time.