Skip to content

Instantly share code, notes, and snippets.

(1..8).each do |file_num|
file_path = "/tmp/onestop/catalog/available_batchynyny1_0000#{file_num}.xml"
puts "Starting processing file #{file_num}"
Supplier::Onestop::ImportProducts.
new(file_path, nil, 'tmp/products_import_errors.csv').
call
puts "Finished processing file #{file_num}"
end
(1..8).each do |file_num|
deploy
|-- deploy:update
|---- deploy:update_code
|------ Code update based on the :deploy_via
|------ deploy:finalize_update
|---- deploy:symlink
|-- deploy:restart
<!--
Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for additional
information regarding copyright ownership. The ASF licenses this file to You under
the Apache License, Version 2.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or
agreed to in writing, software distributed under the License is distributed on an
at org.apache.activemq.console.Main.main(Main.java:115)[activemq.jar:5.13.2]
2016-08-08 11:44:15,923 | ERROR | Failed to load: class path resource [activemq.xml], reason: Error creating bean with name 'Server' defined in class path resource [jetty.xml]: Cannot create inner bean 'Connector' of type [org.eclipse.jetty.server.nio.SelectChannelConnector] while setting bean property 'connectors' with key [0]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.eclipse.jetty.server.nio.SelectChannelConnector] for bean with name 'Connector' defined in class path resource [jetty.xml]; nested exception is java.lang.ClassNotFoundException: org.eclipse.jetty.server.nio.SelectChannelConnector | org.apache.activemq.xbean.XBeanBrokerFactory | main
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Server' defined in class path resource [jetty.xml]: Cannot create inner bean 'Connector' of type [org.eclipse.jetty.server.nio.Sel
{
"Сокольническая линия" => '#cf2028',
"Замоскворецкая линия" => '#13703a',
"Арбатско-Покровская линия" => '#283981',
"Филёвская линия" => '#169cd4',
"Кольцевая линия" => '#8a3127',
"Калужско-Рижская линия" => '#f78e38',
"Таганско-Краснопресненская линия" => '#a35d94',
"Калининская линия" => '#fde34f',
"Серпуховско-Тимирязевская линия" => '#abaeba',
<?php
$data = "foobar";
//$IvSize = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_CBC);
$IvSize = 10;
$IvPhrase = mcrypt_create_iv($IvSize, MCRYPT_RAND);
$key = "crypt key";
$encoded = mcrypt_encrypt(MCRYPT_BLOWFISH, $key, data, MCRYPT_MODE_CBC, $this->IvPhrase);
print base64_encode($encoded);
?>
"black": "Черный",
"white": "Белый",
"beige": "Бежевый",
"brown": "Коричневый",
"blue": "Голубой",
"yellow": "Желтый",
"green": "Зеленый",
"gold": "Золотой",
"red": "Красный",
"orange": "Оранжевый",
{
"results": [
{
"_id": "545ce1482cc1b3e6a8000001",
"make": "Acura",
"modifications": [
"ILX",
"MDX",
"RDX",
"RL",
Duplicate: 0.7429455764245936
{"city"=>"Пермь", "country_code"=>"RU", "street"=>"улица Братьев Вагановых", "house_number"=>"9", "position"=>[58.0180019, 56.285447425]}
{"city"=>"Пермь", "country_code"=>"RU", "street"=>"улица Братьев Вагановых", "house_number"=>"9", "position"=>[58.0240966625, 56.2802778125]}
Duplicate: 0.7508658468982871
{"city"=>"Пермь", "country_code"=>"RU", "street"=>"улица Писарева", "house_number"=>"26", "position"=>[58.1044511125, 56.3128804375]}
{"city"=>"Пермь", "country_code"=>"RU", "street"=>"улица Писарева", "house_number"=>"26", "position"=>[58.109833925000004, 56.305163162499994]}
Duplicate: 1.1842918082280578
{"city"=>"Пермь", "country_code"=>"RU", "street"=>"улица Старцева", "house_number"=>"122", "position"=>[57.9792567125, 56.29672118125]}
{"city"=>"Пермь", "country_code"=>"RU", "street"=>"улица Старцева", "house_number"=>"122", "position"=>[57.98982843125, 56.299161600000005]}
Duplicate: 0.6575989615909674
@ql
ql / gist:7180951
Created October 27, 2013 11:55
vagrant provision shell script
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install git libmysql-ruby libmysqlclient-dev libxslt-dev libxml2-dev libcurl4-openssl-dev make mongodb-10gen redis-server vim build-essentials g++ -y
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build && cd ~/.rbenv/plugins/ruby-build && ./install.sh
su vagrant -c 'PATH="$HOME/.rbenv/bin:$PATH" rbenv install 1.9.3-p327'
su vagrant -c 'PATH="$HOME/.rbenv/bin:$PATH" rbenv global 1.9.3-p327'
su vagrant -c "echo 'export PATH=\"$HOME/.rbenv/bin:$PATH\"' >> ~vagrant/.bash_profile"
su vagrant -c "echo 'eval \"$(rbenv init -)\"' >> ~vagrant/.bash_profile"