Skip to content

Instantly share code, notes, and snippets.

View saterus's full-sized avatar

Alex Burkhart saterus

View GitHub Profile
@saterus
saterus / gist:5760177
Created June 11, 2013 20:09
Neo4j.rb Unique Relationships
class Novel < Neo4j::Rails::Model
property :title, type: String, index: :exact
has_n(:authored_by).to(Author)
end
class Author < Neo4j::Rails::Model
property :name, type: String, index: :exact
- Alex Burkhart
- @Saterus
- neo.com
BASICS:
- REPL
- Ruby Classic: IRB
- ****gem install pry-plus****
START user=node(Z)
MATCH (user)-[:LIKES]->(y)
WHERE y.classname = 'Discussion'
RETURN y;

Custom Curriculum

  • Short, focused classes
  • Clear goals from the outset
  • Measurable progress & outcomes
  • Tangible takeaways

Subjects

  • Ruby
@saterus
saterus / rust_dice_kata.md
Last active August 29, 2015 14:25
Rust Dice Rolling Kata

Dice Roller

Goal

Take a simple idea, package it up in different ways.

Get experience with:

* Cargo
  • Tests
module Foo
def instance_foo
puts "called instance_foo"
end
def self.classy_foo
puts "called classy_foo"
end
end
[1] pry(main)> module Foo
[1] pry(main)* def self.included(base)
[1] pry(main)* base.instance_exec do
[1] pry(main)* define_method :foo do
[1] pry(main)* puts "foo!"
[1] pry(main)* end
[1] pry(main)* end
[1] pry(main)* end
[1] pry(main)* end
=> nil

API Evolution Kata

Today's Kata will evolve a simple API from both the server and the client point of view. The end goal is to produce an API for crafting delicious, delicious burritos.

You will need a pair for this. One person will be writing the server and one person will be writing the client. This will let us evolve our API quickly and require both people to make the appropriate changes. Luckily, Hyper can play both roles!

[11] pry(main)> module M
[11] pry(main)* def foo
[11] pry(main)* puts "self: #{self}"
[11] pry(main)* end
[11] pry(main)* end
=> nil
[12] pry(main)> class C
[12] pry(main)* include M
[12] pry(main)* end

Keybase proof

I hereby claim:

  • I am saterus on github.
  • I am alexburkhart (https://keybase.io/alexburkhart) on keybase.
  • I have a public key ASCERkeVCnpCZh89ht6J9LC6c9WijHqeLeHog67oFHz0JAo

To claim this, I am signing this object: