Skip to content

Instantly share code, notes, and snippets.

View diyan's full-sized avatar

Oleksii Diian diyan

View GitHub Profile
@diyan
diyan / python_qa_automation.md
Last active February 21, 2023 20:33
Learning Python for QA automation tasks

Hello all,

In this gist you may find resources in Russian/English which could be useful for writing Python script for test automation tasks.

What Python runtime I should use?

While Python 3.x (>=3.3) is reccomended for new project development it much better and easier to go with a bit older but rock-solid Python 2.x (>=2.7) for test automation.

Some Python packages comes with binary modules and it much easier to use 32-bit Python under Windows due to this reason.

@diyan
diyan / wine416_staging__dotnet416_devpack.md
Last active February 9, 2023 14:21
WORKS. Setup Wine 4.16 Staging, winetricks, .NET 4.6.1 Developer Pack, NuGet. Compile ASP.NET Web Forms Web Site using Wine/MSBuild
FROM debian:9.11
# Wine on Debian 9, see https://wiki.winehq.org/Debian
# Winetricks, see https://wiki.winehq.org/Winetricks#Installing_winetricks
# WINEDEBUG=-all to suppress Wine debug output
# .NET Runtime via Winetricks, install sequence:
#   v4.0 on WinXP, v4.5 on Win7, v4.6 on Win2003, v4.6.1 on Win7.
RUN set -x \
    && tempDeps='software-properties-common apt-transport-https gnupg wget curl cabextract' \
    && apt-get update \
@diyan
diyan / compile_stdlib.py
Created February 7, 2012 12:07
Compile all Python scripts into single StdLib.dll .NET assembly
# Script below is based on following post:
# IronPython: EXE compiled using pyc.py cannot import module "os" - Stack Overflow
# http://stackoverflow.com/questions/6195781/ironpython-exe-compiled-using-pyc-py-cannot-import-module-os
import sys
sys.path.append('d:/projects/SomeProject/Libs/IronPython')
sys.path.append('d:/projects/SomeProject/Libs/IronPython/Lib')
sys.path.append('d:/projects/SomeProject/Libs/IronPython/Tools/Scripts')
import clr
@diyan
diyan / i3.conf
Last active November 26, 2022 22:53
i3 tiling window manager configuration
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@diyan
diyan / ps_utils.py
Created October 30, 2013 17:33
Change process name for Linux/BSD and using emulation for Windows
# This module based on procname.py module from python-cream project licensed under LGPL
# GitHub repo: https://github.com/cream/python-cream
# Source file: https://github.com/cream/python-cream/blob/master/cream/util/procname.py
# Copyright: 2007-2013, Sebastian Billaudelle <sbillaudelle@googlemail.com>
# 2010-2013, Kristoffer Kleine <kris.kleine@yahoo.de>
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
@diyan
diyan / get_user_name.py
Created December 12, 2012 16:04
Get full name of current logged user in Windows/Linux/Mac OS X.
import os
def get_user_name():
if os.name == 'nt':
import ctypes
GetUserNameExW = ctypes.windll.secur32.GetUserNameExW
name_display = 3
size = ctypes.pointer(ctypes.c_ulong(0))
GetUserNameExW(name_display, None, size)
@diyan
diyan / build_tasks.py
Created October 27, 2011 17:53
Buld script for Python project (virtualenv, pip with requirement file, pylint, py.test, coverage, Jenkins CI) which could be executed from both system and virtual environment
import os
import sys
# One or several build tasks could be executed from Jenkins CI as following:
# #!/bin/bash
# cd $WORKSPACE/release_system/src/build/
# python -c 'from build_tasks import *; code_analysis(); run_tests()'
class BuildEnvironment(object):
package loose
import (
"encoding/json"
"testing"
"time"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
package com.example.akka.stream
import akka.NotUsed
import akka.stream.FlowShape
import akka.stream.javadsl.Balance
import akka.stream.javadsl.Flow
import akka.stream.javadsl.GraphDSL
import akka.stream.javadsl.Merge
// Most likely those classes are useless
@diyan
diyan / python_stack.md
Last active September 3, 2020 10:32
Tools and libraries which I prefer to use in Python stack

Tools and libraries which I prefer to use in Python stack

Development Environment

  • Ubuntu Linux for both development and production
  • Git version control system
  • Jenkins CI build server (but recently I'm moving to git server-side hooks with ssh from git server to dev/stage/prod servers)
  • Redmine bug tracking system
  • JetBrains PyCharm IDE

Production Environment