Skip to content

Instantly share code, notes, and snippets.

View benjohnson77's full-sized avatar

Ben Johnson benjohnson77

View GitHub Profile
@benjohnson77
benjohnson77 / gist:8695801
Last active August 29, 2015 13:55
Quick script for mashing up pipedrive and contacturally
namespace :pipedrive do
desc "Look into match up pipedrive with contactually"
require 'httparty'
require 'json'
task :import => :environment do
require 'csv'
filename = Rails.root + "lib/tasks/meetingplanners.csv"
@benjohnson77
benjohnson77 / gist:5385f119efff85894247
Created July 23, 2014 23:08
refactor of the process_items vs process file
def self.process_file(uploaded_file)
items = []
CSV.foreach(uploaded_file, headers: false) do |row|
items.push(row[0].to_i)
end
process_items(items)
end
def self.process_items(items)
clearancing_status = create_clearancing_status
function alcGetUrlWithProtocol(url)
{
var useSSL = 'https:' == document.location.protocol;
if (useSSL == true){
var new_url = url.replace(/http:/,'https:');
}else{
var new_url = url ;
}
expect(page).to have_select("input[name='client_status_id']", selected: 'All')
expect(page).to have_select("input[name='client_type_id']", selected: 'All')
expect(page).to have_select("input[name='distributor_id']', selected: 'All')
expect(page).to have_select('input[name='state']', selected: 'All')
expect(page).to have_field('client_name', with: '')
expect(page).to have_field('client_email', with: '')
expect(page).to have_field('client_phone', with: '')
describe 'product' do
before(:each) do
visit '/login'
fill_in 'user_name', :with => 'admin'
fill_in 'password', :with => 'Legalinc2015'
click_on 'Sign in'
click_on 'Products'
end
describe 'stats' do
<div class="ls-nav">
<ul>
<?php if($this->session->userdata('user_type_id') == 1 && $this->session->userdata('is_admin') != 1) { ?>
<li><a href="<?=base_url()?>dashboard" <?=($this->uri->segment(1) == 'dashboard'?'class="active"':NULL)?>><span class="icon-dashboard"></span>Dashboard</a></li>
<li><a href="<?=base_url()?>mail" <?=($this->uri->segment(1) == 'mail'?'class="active"':NULL)?>><span class="icon-mail"></span>Mail</a></li>
<li><a href="<?=base_url()?>client" <?=($this->uri->segment(1) == 'client'?'class="active"':NULL)?>><span class="icon-client"></span>Clients</a></li>
<li><a href="<?=base_url()?>company" <?=($this->uri->segment(1) == 'company'?'class="active"':NULL)?>><span class="icon-company"></span>Companies</a></li>
<li><a href="<?=base_url()?>user" <?=($this->uri->segment(1) == 'user'?'class="active"':NULL)?>><span class="icon-user"></span>Users</a></li>
<li><a href="<?=base_url()?>agent" <?=($this->uri->segment(1) == 'agent'?'class="active"':N
set :stages, %w(qa staging production)
require 'capistrano/ext/multistage'
require 'config/sitemap_tasks'
require 'cap_recipes/tasks/passenger'
namespace :deploy do
set(:scm_username) { Capistrano::CLI.ui.ask("SVN User name: ") }
set(:scm_password) { Capistrano::CLI.password_prompt("SVN Password: ") }
set(:scm_release_path) { Capistrano::CLI.ui.ask("svn release ex tags/letsgo_2.x.x: ") }
set :repository, "https://svn.traveladnetwork.com/letsgo/#{scm_release_path}"
@benjohnson77
benjohnson77 / cd.html
Created September 26, 2012 23:17
Content Discovery Widget Tag
<script type="text/javascript" src="http://cdn.investingchannel.com/contentdiscovery/cd.js?s=evilspeculator"></script>
@benjohnson77
benjohnson77 / yb.html
Created October 1, 2012 14:34
testing of yield bot
this is with yield bot working and passing the parameters
<script src="http://ad.doubleclick.net/adj/invc.streetinsider/home;kw=;rnd=38957865363465;kval=home;dcopt=ist;ti_assets=500K_749K;w_deposits=100K_249K;f_cohorts=F22;sid_brokers=yes;sif_brokers=no;i360=254K_plus;dis_spend=140K_182K;e_cohorts=N66;ability_pay=195_261;e_spectrum=A_PS;ybot_ad=y;ybot_slot=728x90;tkr=;tile=1;sz=728x90;viewcount=2;is_search=false;ord=85411350133481?" type="text/javascript"></script>
this is without it passing when the user has not been selected bu YB to provide an ad.
<script src="http://ad.doubleclick.net/adj/invc.streetinsider/home;kw=;rnd=29035804607997;kval=home;dcopt=ist;ti_assets=500K_749K;w_deposits=100K_249K;f_cohorts=F22;sid_brokers=yes;sif_brokers=no;i360=254K_plus;dis_spend=140K_182K;e_cohorts=N66;ability_pay=195_261;e_spectrum=A_PS;tkr=;tile=1;sz=728x90;viewcount=01;is_search=false;ord=53567345274474?" type="text/javascript">
You will notice these kvals added to the double click request.
@benjohnson77
benjohnson77 / yb.html
Created October 1, 2012 14:32
testing of yield bot
h1.this is with yield bot working and passing the parameters
<script src="http://ad.doubleclick.net/adj/invc.streetinsider/home;kw=;rnd=38957865363465;kval=home;dcopt=ist;ti_assets=500K_749K;w_deposits=100K_249K;f_cohorts=F22;sid_brokers=yes;sif_brokers=no;i360=254K_plus;dis_spend=140K_182K;e_cohorts=N66;ability_pay=195_261;e_spectrum=A_PS;ybot_ad=y;ybot_slot=728x90;tkr=;tile=1;sz=728x90;viewcount=2;is_search=false;ord=85411350133481?" type="text/javascript"></script>
h2. this is without it passing when the user has not been selected bu YB to provide an ad.
<script src="http://ad.doubleclick.net/adj/invc.streetinsider/home;kw=;rnd=29035804607997;kval=home;dcopt=ist;ti_assets=500K_749K;w_deposits=100K_249K;f_cohorts=F22;sid_brokers=yes;sif_brokers=no;i360=254K_plus;dis_spend=140K_182K;e_cohorts=N66;ability_pay=195_261;e_spectrum=A_PS;tkr=;tile=1;sz=728x90;viewcount=01;is_search=false;ord=53567345274474?" type="text/javascript">