Skip to content

Instantly share code, notes, and snippets.

View jeffdeville's full-sized avatar

Jeff Deville jeffdeville

View GitHub Profile
@jeffdeville
jeffdeville / createCloudAccountRequest.xml
Last active August 29, 2015 13:57
Iterations on interfacing with createCloudAccountRequest
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:v1="http://www.sungard.com/bsil/acctmgmt/v1-0"
xmlns:v11="http://www.sungard.com/ws/v1-0"
xmlns:v12="http://www.sungard.com/common/v1-0"
xmlns:v13="http://www.sungard.com/product/v1-0"
xmlns:v14="http://www.sungard.com/cloud/v1-0"
xmlns:v15="http://www.sungard.com/payment/v1-0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$'
let g:ctrlp_use_caching = 0
let g:ctrlp_user_command = 'ag %s -l --nocolor --hidden -g ""'
" Default to filename searches - so that appctrl will find application
" controller
let g:ctrlp_by_filename = 1
" We don't want to use Ctrl-p as the mapping because
" it interferes with YankRing (paste, then hit ctrl-p)
let g:ctrlp_map = ',f'
@jeffdeville
jeffdeville / README
Created February 3, 2014 14:48
Keep your tags up to date automatically. Tweaked from https://github.com/jjasonclark/dotvim/blob/master/bundle/autotag/autotag.vim to use ripper-tags
you need ripper-tags for this to work.
`gem install ripper-tags`
then just drop the .vim script in
@jeffdeville
jeffdeville / IntradayPriceQuery.cs
Created July 10, 2013 13:54
Loading realtime advise data on all stocks in an exchange via .net
using System;
using System.Linq;
using System.Threading;
using NLog;
using RealTick.Api.ClientAdapter;
using RealTick.Api.Domain;
using RealTick.Api.Domain.Livequote;
namespace Chaikin.RealTick
{
@jeffdeville
jeffdeville / find_sums.rb
Created June 19, 2013 00:52
Benchmarking the difference in speed w/ 2 different algorithms that search an array for
# Side effect is that converting the array to a hash will remove
# duplicate entries, if they exist
require 'benchmark'
def find_sums_hashed(arr, target)
hash = Hash[*arr.zip(Array.new(arr.length)).flatten]
hash.each_key do |key|
if hash.has_key?(target-key) && target != target - key
yield [key, target-key] if block_given?
end
{
bullish_alerts: {
buy_signals: {
today: [
{symbol: AAPL, name: "A-SignalType", trigger_price: 999.99 },
{symbol: AAPL, name: "A-SignalType", trigger_price: 999.99 },
{symbol: AAPL, name: "B-SignalType", trigger_price: 999.99 },
{symbol: AAPL, name: "C-SignalType", trigger_price: 999.99 },
]
@jeffdeville
jeffdeville / SampleData.js
Last active December 15, 2015 16:59
Sample data for highcharts. Images in the zip file have each data series labeled.
// x-axis - time values:
time_values = [1332475200000, 1332734400000, 1332820800000, 1332907200000, 1332993600000, 1333080000000, 1333339200000, 1333425600000, 1333512000000, 1333598400000, 1333944000000, 1334030400000, 1334116800000, 1334203200000, 1334289600000, 1334548800000, 1334635200000, 1334721600000, 1334808000000, 1334894400000, 1335153600000, 1335240000000, 1335326400000, 1335412800000, 1335499200000, 1335758400000, 1335844800000, 1335931200000, 1336017600000, 1336104000000, 1336363200000, 1336449600000, 1336536000000, 1336622400000, 1336708800000, 1336968000000, 1337054400000, 1337140800000, 1337227200000, 1337313600000, 1337572800000, 1337659200000, 1337745600000, 1337832000000, 1337918400000, 1338264000000, 1338350400000, 1338436800000, 1338523200000, 1338782400000, 1338868800000, 1338955200000, 1339041600000, 1339128000000, 1339387200000, 1339473600000, 1339560000000, 1339646400000, 1339732800000, 1339992000000, 1340078400000, 1340164800000, 1340251200000, 1340337600000, 1340596800000, 134068320
@jeffdeville
jeffdeville / factory_girl_association_failure.rb
Created December 6, 2012 16:19
FactoryGirl associations failure
class User < ActiveRecord::Base
attr_accessible :name
has_one :address
end
class Address < ActiveRecord::Base
attr_accessible :addr1, :addr2
belongs_to :user
validates_presence_of :user
end
describe FactoryGirl::EvaluatorClassDefiner do
let(:simple_attribute) {
stub("simple attribute", name: :simple, to_proc: -> { 1 })
}
let(:relative_attribute) {
stub("relative attribute", name: :relative, to_proc: -> { simple + 1 })
}
let(:evaluator) {
class_definer = FactoryGirl::EvaluatorClassDefiner.new(
@jeffdeville
jeffdeville / pms_integration_test.rb
Created August 29, 2012 17:49
packlate_pms_integration options for selectively enabling validations.
require 'rubygems'
require 'active_model'
class Test
include ActiveModel::Validations
def initialize(attributes = {})
attributes.each do |name, value|
send("#{name}=", value)
end