Skip to content

Instantly share code, notes, and snippets.

Vladimir Rutsky rutsky

Block or report user

Report or block rutsky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rutsky / install.log
Created Apr 19, 2016
Install Buildbot master[docs] without enchant native library
View install.log
$ sudo docker run -ti --rm -v $PWD/buildbot:/buildbot python:2.7 /bin/bash
root@7d76ec1e95ad:/# pip install -e /buildbot/master/[docs]
Obtaining file:///buildbot/master
Collecting Twisted>=14.0.1 (from buildbot===0.9.0b8-67-g9f3e79a)
Downloading Twisted-16.1.1.tar.bz2 (2.9MB)
100% |████████████████████████████████| 2.9MB 367kB/s
Collecting Jinja2>=2.1 (from buildbot===0.9.0b8-67-g9f3e79a)
Downloading Jinja2-2.8-py2.py3-none-any.whl (263kB)
100% |████████████████████████████████| 266kB 2.4MB/s
Collecting zope.interface>=4.1.1 (from buildbot===0.9.0b8-67-g9f3e79a)
rutsky / bug1760.yaml
Created Aug 2, 2016
swagger-ui response render bug
View bug1760.yaml
swagger: '2.0'
version: 1.0.0
title: Sample for testing display of reponse models
description: |
It seems like display of response models in swagger-ui depends on how they're defined.
Particularly, whether they're referenced or in line. It should not matter.
basePath: /sample
- application/json
rutsky / README.rst
Last active Jan 15, 2017
Single-file buildbot-worker using PyInstaller
View README.rst

Clone gist:

git clone single-file-buildbot-worker
cd single-file-buildbot-worker

Build with:

sudo docker run -ti -v ${PWD}:/src/ --rm python:2.7 /src/

If all went fine, generated single-file buildbot-worker will be in

rutsky / CMakeLists.txt
Created Jan 17, 2017
Place 8 Queens on Chessboard
View CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})
rutsky /
Created Jan 30, 2017
Example of backoff usage with asyncio
import asyncio
import logging
import aiohttp
import backoff
rutsky /
Created Jun 4, 2015
QQmlComponent.create() item ownership PyQt bug example
import sys
import textwrap
import sip
from PyQt5.QtQml import QQmlEngine, QQmlComponent
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import QUrl
View README.txt
$ gcc -Wall -S pow.c
$ wc -l pow.s
118139 pow.s
rutsky / 45fix-usb-wakup
Created Jun 8, 2014
pm-utils script to disable wakup by events from USB devices on Sony Vaio 1311s9rb
View 45fix-usb-wakup
# /usr/lib/pm-utils/sleep.d/45fix-usb-wakup
# Disable wakup from USB devices on Sony Vaio 1311s9rb
function print_state {
cat /proc/acpi/wakeup | grep $1 | cut -f3 | cut -d' ' -f1 | tr -d '*'
function disable_wakup {
rutsky /
Created Jul 17, 2018
cgo race condition example

Ran on a laptop with 4 cores.

$ go version
go version go1.10.1 linux/amd64
$ go run cgo.go 
panic: Iteration 39068207 - receive: "y" != "\x00"

goroutine 5 [running]:
You can’t perform that action at this time.