Skip to content

Instantly share code, notes, and snippets.

View urbantumbleweed's full-sized avatar

Stephen Saunders urbantumbleweed

View GitHub Profile
@urbantumbleweed
urbantumbleweed / html
Created July 22, 2023 18:50
20230717 Bend Prices of Closed
This file has been truncated, but you can view the full file.
<html>
<head><meta charset="utf-8" /></head>
<body>
<div> <script type="text/javascript">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>
<script type="text/javascript">/**
* plotly.js v2.24.1
* Copyright 2012-2023, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
@urbantumbleweed
urbantumbleweed / person.rb
Last active August 29, 2015 13:58
Setting up testing environment
require 'spec_helper'
describe Person do
before do
let(:person) { factory(:person) }
end
describe ".create" do
it "should have an img_url, drinks_attribute, license, first name and last name when created" do
@urbantumbleweed
urbantumbleweed / Ticker.rb
Created April 1, 2014 00:58
Reading CSV data into database
class Ticker < ActiveRecord::Base
has_many :price_histories, dependent: :destroy
has_many :scans
has_and_belongs_to_many :patterns
has_many :opportunities
has_many :trades, through: :opportunities
def retrieve_standard_quote
#requests the standard quote from Yahoo