Skip to content

Instantly share code, notes, and snippets.

View VladRassokhin's full-sized avatar

Vladislav Rassokhin VladRassokhin

View GitHub Profile
@VladRassokhin
VladRassokhin / tc-cloud-image-id-from-source-id.xslt
Created June 5, 2023 12:00
TeamCity XML configs: replace CloudImage id for source-id
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="no"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="extension[@type='CloudImage']/@id">
@VladRassokhin
VladRassokhin / composite-cleanup.xslt
Created June 25, 2022 09:40
Cleanup TeamCity composite build configurations xml configs
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="no" method="xml" indent="yes" encoding="UTF-8"
cdata-section-elements="param"
xalan:indent-amount="2" xmlns:xalan="http://xml.apache.org/xalan"/>
<xsl:strip-space elements="*"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
@VladRassokhin
VladRassokhin / intel_ark_comparison_xml_converter.py
Created October 4, 2019 13:45
Convert Intel ARK Product Specification Comparison XML into CSV
# coding: utf-8
import datetime
import re
import sys
import xmltodict
reload(sys)
sys.setdefaultencoding('utf-8')
@VladRassokhin
VladRassokhin / log.txt
Last active February 22, 2021 06:07
terraform init on recursive modules
terr-recursion $ terraform-0.12.7 init
Initializing modules...
- a in a
- a.p in .
- a.p.a in a
- a.p.a.p in .
- a.p.a.p.a in a
- a.p.a.p.a.p in .
- a.p.a.p.a.p.a in a
- a.p.a.p.a.p.a.p in .
@VladRassokhin
VladRassokhin / profiling.patch
Created July 16, 2019 13:07
Packer vmware-iso profiling patch
Index: helper/communicator/step_connect.go
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- helper/communicator/step_connect.go (revision 2eb80a81e39d760c77b165863866bbc72a3c5861)
+++ helper/communicator/step_connect.go (date 1563282177973)
@@ -4,6 +4,9 @@
"context"
"fmt"
#cd `mktemp -d`
git clone https://github.com/yandex/clickhouse
cd clickhouse/
git checkout v1.1.54353-testing
cd docker/server/
docker build --build-arg version=1.1.54343 -t clickhouse-server:1.1.54343 .
# Fails with:
# Reading package lists...
# E: The repository 'https://repo.yandex.ru/clickhouse/xenial dists/stable/main/binary-amd64/ Release' is not signed.
# The command '/bin/sh -c apt update && apt install -y apt-transport-https && mkdir -p /etc/apt/sources.list.d && echo $repository | tee /etc/apt/sources.list.d/clickhouse.list && apt update && apt install --allow-unauthenticated -y clickhouse-server-common=$version clickhouse-server-base=$version && rm -rf /var/lib/apt/lists/* /var/cache/debconf && apt clean' returned a non-zero code: 100
@VladRassokhin
VladRassokhin / build-push-clickhouse.sh
Last active March 12, 2018 21:32
Build and publish ClickHouse docker images
#!/usr/bin/env bash
# Each step could be separate build configuration (in terms of TeamCity) with proper dependencies between them
# STEP 0
# Init variables
version="1.1.54343"
server_tag="yandex/clickhouse-server:$version"
client_tag="yandex/clickhouse-client:$version"
#!/usr/bin/env bash
function __tc_encode {
# Only unicode characters are not supported
echo -n "$1" | sed "s/\([|']\)/\|\1/g; s/\[/\|\[/g; s/\]/\|\]/g; s/\r/\|r/g;" | sed ':a;N;$!ba;s/\n/|n/g'
}
function __tc_message {
echo "##teamcity[message text='$(__tc_encode "$2")' status='${1:-NORMAL}']"
}
function __tc_simple {
@VladRassokhin
VladRassokhin / console-output.log
Created June 20, 2016 16:22
vagrant box remove ubuntu/trusty64 --box-version '< 20160602.0.0'
$ vagrant box remove ubuntu/trusty64 --box-version '< 20160602.0.0'
You requested to remove the box 'ubuntu/trusty64' version '< 20160602.0.0' with
provider 'virtualbox', but that specific version of the box is
not installed. Please double-check and try again. The available versions
for this box are:
* 20150512.0.1
* 20150609.0.10
* 20160208.0.0
* 20160222.0.0
@VladRassokhin
VladRassokhin / Gemfile
Created April 11, 2016 17:54
Rails master rake failure
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
#gem 'rails', '>= 5.0.0.beta3', '< 5.1'
gem 'rails', github: "rails/rails"
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma'