Skip to content

Instantly share code, notes, and snippets.

View vitalvas's full-sized avatar

Vitaliy Vasylenko vitalvas

View GitHub Profile
@vitalvas
vitalvas / commands
Created January 6, 2018 16:00 — forked from msimonin/commands
install ubuntu on a virtual machine (libvirt / kvm)
# get the iso
wget http://releases.ubuntu.com/14.04.3/ubuntu-14.04.3-server-amd64.iso
# create the image disk
qemu-img create -f qcow2 disk.qcow2 10G
# launch the creation
virsh create ubuntu.xml
# you can connect to using vnc.
@vitalvas
vitalvas / build_ch.sh
Created April 28, 2017 12:21 — forked from lomik/build_ch.sh
Сборщик rpm clickhouse
#!/bin/bash
set -x
set -e
IMAGE="Докер образ с centos7, rpmbuild, fpm"
# Докер-образ строится примерно такой командой (возможно что-то забыто):
# RUN yum install -y rpm-build ruby ruby-devel rubygems && gem install fpm && yum clean all
docker run --rm -ti $IMAGE bash -c '
@vitalvas
vitalvas / migrator.go
Created May 7, 2016 12:43 — forked from dbudworth/migrator.go
simple migrator for go
package main
import (
"bufio"
"database/sql"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
import redis
import threading
class Listener(threading.Thread):
def __init__(self, r, channels):
threading.Thread.__init__(self)
self.redis = r
self.pubsub = self.redis.pubsub()
self.pubsub.subscribe(channels)
#!/usr/bin/env python
## Tiny Syslog Server in Python.
##
## This is a tiny syslog server that is able to receive UDP based syslog
## entries on a specified port and save them to a file.
## That's it... it does nothing else...
## There are a few configuration parameters.
LOG_FILE = 'youlogfile.log'