Skip to content

Instantly share code, notes, and snippets.

View Breefield's full-sized avatar

Bree Hoffman Breefield

View GitHub Profile

Keybase proof

I hereby claim:

  • I am breefield on github.
  • I am breefield (https://keybase.io/breefield) on keybase.
  • I have a public key whose fingerprint is B286 EB99 80CE 619E 5C1D 8DA4 4FDD ED6F A310 5C0D

To claim this, I am signing this object:

@Breefield
Breefield / wanelo.rb
Created June 17, 2014 19:59
Dump items from Svpply onto Wanelo.
#!/usr/bin/env ruby
require 'rubygems'
require 'json'
require 'pp'
require 'open-uri'
require 'cgi'
require 'httparty'
affiliate_id = 'olenaw-20'
@Breefield
Breefield / test.rb
Created April 8, 2014 01:15
Testing
"wow".downcase
<div class="big-number">
<h1>{{ options.speed }}</h1>
{{#if options.speed > 500}}
<p>Wow that's really fast
{{/if}}
</div>
<style type="text/css">
#plugin-{{id}} {
{
"animal": {
"id": 1,
"kind": "Lion",
"waterhole_ids": [1, 2]
},
"waterholes": [
{ "id": 1, "name": "lots of water here" },
{ "id": 2, "name": "so much h2o"}
],
{
"animal": {
"id": 1,
"kind": "Lion",
"waterhole_ids": [1, 2]
},
"waterholes": [
{ "id": 1, "name": "lots of water here" },
{ "id": 2, "name": "so much h2o"}
],
class AnimalSerializer < ActiveModel::Serializer
embed :ids, include: true
attributes :id, :kind, :classification
has_many :waterholes
end
def index
@animals = Animal.all
respond_to do |f|
f.html {}
f.json { render json: @animals }
end
end
def index
@animals = Animal.all
render json: @animals
end
def show
render json: @animal
end
def index
@animals = Animal.all
render json: @animals
end