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
sudo sed -i -e 's/mirror.rackspace.com\|archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list |
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
<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 |
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
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 |
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
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: '') |
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
function alcGetUrlWithProtocol(url) | |
{ | |
var useSSL = 'https:' == document.location.protocol; | |
if (useSSL == true){ | |
var new_url = url.replace(/http:/,'https:'); | |
}else{ | |
var new_url = url ; | |
} | |
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
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 |
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
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" |
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
Started GET "/books" for 96.226.128.2 at 2013-10-22 20:18:56 +0000 | |
Processing by Web::BooksController#index as HTML | |
User Load (2.7ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 38 LIMIT 1 | |
(2.4ms) SELECT COUNT(*) FROM `reading_actions` WHERE `reading_actions`.`user_id` = 38 AND `reading_actions`.`action_type` = 'have_read' | |
(75.2ms) SELECT COUNT(*) FROM `reading_actions` WHERE `reading_actions`.`user_id` = 38 AND `reading_actions`.`action_type` = 'want_to_read' | |
(54.7ms) SELECT COUNT(*) FROM `reading_actions` LEFT OUTER JOIN readings ON readings.reading_action_id = reading_actions.id WHERE `reading_actions`.`user_id` = 38 AND (reading_actions.readable_type in ('Book', 'SocialBook') AND reading_actions.action_type = 'reading_now') AND (CASE WHEN readings.is_private = 1 THEN readings.user_id = 38 ELSE 1 = 1 END) | |
Rendered shared/v2/_breadcrumb.haml (2.3ms) | |
(2.8ms) SELECT COUNT(count_column) FROM (SELECT 1 AS count_column FROM `reading_actions` LEFT OUTER JOIN readings ON readings.readin |
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
I decided to add RDS environment to my testing. So I can compare AWS(RDS) to rackspace(Rack DB) to GCE (cloud-SQL) and this is what I find running the same benchmark on all three. GCE is in the same zone, and for comparison AWS server is also in the same zone as RDS. | |
benchmark I am using is perl test-wisconsin from sql bench | |
Wisconsin benchmark test | |
Time for create_table (3): 1 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) | |
Inserting data | |
Time to insert (31000): 317 wallclock secs ( 1.95 usr 2.09 sys + 0.00 cusr 0.00 csys = 4.04 CPU) | |
Time to delete_big (1): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) |
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
➜ crockpot git:(master) ✗>knife bootstrap ---- ommitted ----- | |
Bootstrapping Chef on 173.255.117.224 | |
173.255.117.224 Starting Chef Client, version 11.6.0 | |
173.255.117.224 resolving cookbooks for run list: ["ohai", "sudo", "users::sysadmins", "apt", "git", "snap", "locales", "imagemagick", "logrotate", "rvm::user", "mysql", "bookshout_passenger", "bookshout_passenger::qa", "instramentalapp_agent"] | |
173.255.117.224 Synchronizing Cookbooks: | |
173.255.117.224 - instramentalapp_agent | |
173.255.117.224 - bookshout_passenger | |
173.255.117.224 - openssl | |
173.255.117.224 - build-essential | |
173.255.117.224 - mysql |
NewerOlder