Skip to content

Instantly share code, notes, and snippets.

View nick-demianchuk's full-sized avatar

Nikolai Demianchuk nick-demianchuk

View GitHub Profile
Console.WriteLine("Введите a");
float a = Float.Parse(Console.Readline());
Console.WriteLine("Введите b");
float b = Float.Parse(Console.Readline());
Console.WriteLine("Введите действие");
char z = Convert.ToChar(Console.Readline());
switch (z)
@nick-demianchuk
nick-demianchuk / kafkacat_fixed_key.patch
Created January 24, 2019 15:56
kafkacat fixed key patch
diff --git a/kafkacat.c b/kafkacat.c
index e7b59ab..fc0b59f 100644
--- a/kafkacat.c
+++ b/kafkacat.c
@@ -205,7 +205,7 @@ static void produce (void *buf, size_t len,
* Produce contents of file as a single message.
* Returns the file length on success, else -1.
*/
-static ssize_t produce_file (const char *path) {
+static ssize_t produce_file(char *key, size_t key_len, const char *path) {
@nick-demianchuk
nick-demianchuk / migrator.sh
Created February 19, 2018 14:10 — forked from vigneshwaranr/migrator.sh
Script to convert SQLITE dumps into PostgreSQL compatible dumps
#! /bin/sh
usage_error () {
echo 'Usage: sh migrator.sh <path to sqlite_to_postgres.py> <path to sqlite db file> <an empty dir to output dump files>'
echo
echo 'Example:'
echo '>sh migrator.sh sqlite_to_postgres.py ~/reviewboard.db /tmp/dumps'
echo
echo 'Tested on:'
echo 'Python 2.7.3'
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console
logger:
# log action execution errors for easier debugging
action: DEBUG
# reduce the logging for aws, too much is logged under the default INFO
com.amazonaws: WARN
appender: