Skip to content

Instantly share code, notes, and snippets.

View ryanfitz's full-sized avatar

Ryan Fitzgerald ryanfitz

View GitHub Profile
require 'rubygems'
require 'httparty'
require 'pp'
module NflKnockout
class Client
include HTTParty
format :xml
base_uri 'http://football.myfantasyleague.com'
require 'test/unit'
require 'nfl_scores'
require 'rubygems'
require 'fakeweb'
class NflScoresTest < Test::Unit::TestCase
def setup
FakeWeb.allow_net_connect = false
FakeWeb.register_uri(:get, "http://football.myfantasyleague.com/2009/export?TYPE=nflSchedule&W=1", :body => nfl_schedule_xml)
end
#!/usr/bin/env python
# encoding: utf-8
import sys
import os
from suds.client import Client
from suds.wsse import *
USERNAME = '[email protected]'
#!/usr/bin/env python
# encoding: utf-8
import sys
import os
from suds.client import Client
from suds.wsse import *
import logging
/Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/rake-0.8.7/lib/rake.rb:2503:in `const_missing': uninitialized constant Padrino::Mailer (NameError)
from /Users/fitz/Projects/test_app/app/app.rb:2:in `<class:TestApp>'
from /Users/fitz/Projects/test_app/app/app.rb:1:in `<top (required)>'
from /Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/padrino-core-0.9.11/lib/padrino-core/reloader.rb:153:in `require'
from /Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/padrino-core-0.9.11/lib/padrino-core/reloader.rb:153:in `safe_load'
from /Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/padrino-core-0.9.11/lib/padrino-core/loader.rb:76:in `block in require_dependencies'
from /Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/padrino-core-0.9.11/lib/padrino-core/loader.rb:74:in `each'
from /Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/padrino-core-0.9.11/lib/padrino-core/loader.rb:74:in `require_dependencies'
from /Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/padrino-core-0.9.11/lib/padrino-core/application/mounter.rb:81:i
/Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/activesupport-2.3.8/lib/active_support/vendor/tzinfo-0.3.12
/Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/activesupport-2.3.8/lib/active_support/vendor/memcache-client-1.7.4
/Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/activesupport-2.3.8/lib/active_support/vendor/builder-2.1.2
/Users/fitz/Projects/test_app
/Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/thin-1.2.7/lib
/Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/rspec-1.3.0/lib
/Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/rack-test-0.5.4/lib
/Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/rack-flash-0.1.1/lib
/Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/padrino-0.9.11/lib
/Users/fitz/.rvm/gems/ruby-1.9.2-preview3/gems/padrino-mailer-0.9.11/lib
@ryanfitz
ryanfitz / haml-js assets
Created January 25, 2011 04:07
setup jammit with haml-js
embed_assets: on
javascript_compressor: yui
# template_function: "_.template"
template_function: "Haml"
javascripts:
common:
- public/javascripts/vendor/jquery.js
- public/javascripts/vendor/jquery-ui.js
- public/javascripts/vendor/rails.js
class Routine
include Mongoid::Document
field :name, :type => String
field :description, :type => String
embeds_many :workouts
accepts_nested_attributes_for :workouts, :allow_destroy => true
end
class User
include Mongoid::Document
field :username, :type => String
field :full_name, :type => String
references_many :friends, :class_name => 'User', :stored_as => :array, :inverse_of => :followers
references_many :followers, :class_name => "User", :stored_as => :array, :inverse_of => :friends
end
@ryanfitz
ryanfitz / stitch_jade_compile.js
Created February 19, 2011 02:26
render jade templates on client side using stitch
var stitch = require('stitch');
var express = require('express');
options = {
paths : [__dirname + '/lib', __dirname + '/vendor'],
compilers: {
jade: function(module, filename) {
var jade = require('jade');
var source = require('fs').readFileSync(filename, 'utf8');