Skip to content

Instantly share code, notes, and snippets.

View tjlee's full-sized avatar
:octocat:

Vasilii Chernov tjlee

:octocat:
View GitHub Profile
@tjlee
tjlee / example.scala
Last active November 17, 2016 20:53
example
package net.admoment.tests.functional.services
import org.scalatest._
import scalaj.http.{HttpOptions, Http}
import net.admoment.tests.WebTest
import com.google.gson.Gson
import net.admoment.db.model._
import org.springframework.beans.factory.annotation.Autowired
import com.typesafe.config.Config
import org.springframework.test.context.{TestContextManager, ContextConfiguration}
--Добавление ЕГАИС (включение для алкогольных товаров происходит на кассах)
INSERT INTO service_type(id, name)
VALUES (nextval('hibernate_sequence'), 'egais');
INSERT INTO service_provider(id, deleted, name, registered_name, service_type, settings_on_shop)
VALUES (nextval('hibernate_sequence'), FALSE, 'egais','ЕГАИС',(SELECT id FROM service_type WHERE name='egais'),FALSE);
INSERT INTO service_provider_settings(id, name, value, provider)
VALUES (nextval('hibernate_sequence'), 'egais_url', 'http://172.16.7.10:8080/xml', (SELECT id FROM service_provider WHERE name='egais' AND deleted=FALSE));
public boolean checkGiftCardStatus(String code, CardStatus status) throws TestException {
try {
Connection conn = getCentrumConnection(SET);
String sql = "SELECT * FROM card_cards WHERE numberfield = ? ";
PreparedStatement st = conn.prepareStatement(sql);
st.setString(1, code);
ResultSet rs = st.executeQuery();
boolean exist = false;
while (rs.next()) {
exist = rs.getInt("status") == status.ordinal();
__author__ = 'v.chernov'
import requests
from pymongo import MongoClient
from multiprocessing import Pool
def db_connection():
client = MongoClient('mongodb://localhost:27017/')
base = client.posts_db
{"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"Set10.ear\".\"SET-Scales-Tech.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"Set10.ear\".\"SET-Scales-Tech.jar\".POST_MODULE: Failed to process phase POST_MODULE of subdeployment \"SET-Scales-Tech.jar\" of deployment \"Set10.ear\"","jboss.deployment.subunit.\"Set10.ear\".\"SET-Scales-GUI.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"Set10.ear\".\"SET-Scales-GUI.jar\".POST_MODULE: Failed to process phase POST_MODULE of subdeployment \"SET-Scales-GUI.jar\" of deployment \"Set10.ear\""},"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.SetRetail10.SET-OperDay.SET/SenderFiscalInfoToCentrum.ValidatorFactoryjboss.naming.context.java.comp.SetRetail10.SET-OperDay.SET/SenderFiscalInfoToCentrumMissing[jb
@tjlee
tjlee / tfs.rb
Last active December 17, 2015 15:39
Ruby methods to work with TFS
def check_out()
output = `tf @./tfs_scripts/checkout.tfs #{@tfs_path} #{@user} #{@domen} #{@password}`
end
def check_in()
output = `tf @./tfs_scripts/checkin.tfs`
@tjlee
tjlee / checkout.tfs
Created May 23, 2013 07:09
TFS check out script
workspace -new -server:%1/tfs -login:%3\%2,%4 Workspace -noprompt
workfold -map $/ProjectName Temp -workspace:Workspace/Temp
get $/ProjectName/PathTo/File/toGet.ext
checkout $/ProjectName/PathTo/File/toGet.ext
@tjlee
tjlee / checkin.tfs
Created May 23, 2013 07:07
TFS check in script
checkin $/ProjectName/PathTo/File/toGet.ext -comment:"Ruby TFS test checkin" -noprompt
workfold -unmap -workspace:Workspace $/ProjectName
workspace /delete Workspace -noprompt