This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var internalId = setInterval(function() { | |
$("html, body").animate({ scrollTop: $(document).height()-$(window).height() }); | |
setTimeout(function() { | |
$('a.movie').each(function(i, el) { | |
var $el = $(el); | |
var styleValue = $($el.find('span.rating > span')[0]).attr('style'); | |
var ranking = parseFloat((styleValue || '-1').substring(7).replace("%;", '')); | |
if (isNaN(ranking)|| ranking < 80) { | |
$el.remove(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Given the word list, count how many words are in the dictionary. | |
# Note: This isn't the most efficient way to do thise. If I was going for | |
# speed, I would have made each dicitonary word the key of a hash, and | |
# had O(n) lookup times. | |
def process_words(words, dictionary) | |
puts "Starting thread #{Thread.current.object_id}\n" | |
found = 0 | |
words.each do |word| | |
if dictionary.include? word |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Given the following User Story: | |
## As a registered User, | |
## I want to send a technical request to the sys admin, | |
## So that they are aware I have a problem. | |
## Acceptance criteria | |
## * Email sent to ENV['ADMIN_EMAIL'] | |
## Provide a "spec outline" which clearly shows what you will be testing, illustrated by file locations and | |
## statement hierarchy without actually writing any [implementation] code, for example: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Yodlee:Api::V1::RequestBuilder | |
METADATA_REQUESTS = | |
{ | |
get_user_info: { method: :get, path: '/user' }, | |
list_accounts: { method: :get, path: '/accounts' }, | |
create_user: { method: :post, path: '/user/register' } | |
} | |
attr_accessor :cobrand_session, :user_session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/models/user.rb | |
class User | |
include YodleeRegistrable | |
end | |
# app/models/concers/yodlee_registrable.rb | |
module YodleeRegistrable | |
extend ActiveSupport::Concern | |
included do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/yodlee/api/v1/provider.rb | |
class Yodlee::Api::V1::Provider < Yodlee::Api::V1::Base | |
# [ {id: 1, lastModified: 2013-01-02T00:39:52Z}, {id: 3, lastModified: 2013-01-02T00:39:52Z}, {id: 4, lastModified: 2013-01-02T00:39:52Z} ] | |
def list_all | |
caller_result = for_session.list_providers | |
list = [] | |
caller_result.provider.map do |provider| | |
partial_provider = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Code downloaded from https://developer.yodlee.com/Aggregation_API/Sample_Apps/RUBY | |
require './aggregation/SiteApp' | |
require './util/Encryption' | |
$encryptCall = Encryption.new | |
$siteCall = SiteApp.new | |
$providerAccountId = '' | |
class AddSiteAccount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/controllers/institution_controller.rb | |
class InstitutionsController < ApplicationController | |
def create | |
if uses_intuit? | |
#existing code | |
else | |
service_response = Services::YodleeAccount::Register.call(current_user, params, id) | |
redirect to_some_place_after_success_login and return if service_response[:status] == :complete | |
render 'mfa_form', mfa_form: service_response[:mfa_form] and return if service_response[:status] == :missing_mfa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query { | |
captureForm(shortId: "an id") { | |
account { | |
avatarUrl | |
isVerified | |
} | |
afterSubmission | |
avatarMedia { | |
extensionType | |
sourceUuid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///////////////// | |
// The query | |
///////////////// | |
query { | |
optInForm(shortId: "an id") { | |
account { | |
avatarUrl |