Skip to content

Instantly share code, notes, and snippets.

View knagode's full-sized avatar

Klemen Nagode knagode

View GitHub Profile
Error 3140 : While trying to Add a(n) Invoice with name or order number of R1058, QB responded There is an invalid reference to QuickBooks Term "Prepay" in the Invoice. QuickBooks error message: Invalid argument. The specified record does not exist in the list. Try adding the customer or product to QB manually. Then, resync this transaction. For more info, see http://support.connexforquickbooks.com/hc/en-us/articles/204406968-Back-Orders-and-Manual-Sync For more info, see http://support.connexforquickbooks.com/hc/en-us/articles/206095018
.contacts {
ul li {
backaground: gray;
&:nth-child(even) {
background: #aaa;
}
}
}
# Method which flattens the array:[[1,2,[3]],4] -> [1,2,3,4]
module Flattenizer
def flattenize array
return [array] unless array.kind_of?(Array) # result of method is always array
result = []
array.each do |item|
flattenize(item).each do |r| # ensure that result will not be nested
result << r
end
end
@knagode
knagode / gist:b0be5225e028d1d3c152
Last active August 29, 2015 14:05
Rails Copybara scrap example
require 'rails_helper'
require 'rspec/rails'
feature "scrapper" do
it "gets all companies which export to austria" do
# first lets visit setting where we will include financial data inside our search results
visit "http://www.sloexport.si/default.asp?MenuID=279&Settings=true"
sleep(0.3)
find(:xpath, ".//input[@value='8']").click
find(:xpath, ".//input[@name='btnResultSettings']").click
country = "Austria"