Skip to content

Instantly share code, notes, and snippets.

@atykhonov
atykhonov / selenium.py
Created August 18, 2016 00:50
Declaration
def create_tests(cls):
"""
Create selenium tests for `Firefox`, `Chrome` and for `IE` in case
of the current platform is `nt`.
"""
def create_test_class(browser, mixin):
"""
Create test class. Its name consists of prefix 'Test', name of the
class `cls` and given `browser`. It extends `cls`,
`SeleniumAppUserFunctionalTest` and given `mixin`.
$ ./paver.sh test_quick 2466-cdp-support
---> pavement.test_quick
---> brink.pavement_commons.test_python
---> pavement.build
---> brink.pavement_commons.coverage_prepare
Cleaning orphaned files in /str/development/projects/chevah/server/build-linux-x64
Cleaning orphaned files in chevah/server
cd /str/development/projects/chevah/server/build-linux-x64
Skipping current directory
Listing /str/development/projects/chevah/server/build-linux-x64 ...
$ ./paver.sh test -x 3515-emit-event-after-file-is-rotated
---> pavement.test
---> pavement.build
Cleaning orphaned files in /str/development/projects/chevah/server/build-linux-x64
Cleaning orphaned files in chevah/server
cd /str/development/projects/chevah/server/build-linux-x64
Skipping current directory
Listing /str/development/projects/chevah/server/build-linux-x64 ...
Listing /str/development/projects/chevah/server/build-linux-x64/lib/python27.zip ...
Can't list /str/development/projects/chevah/server/build-linux-x64/lib/python27.zip
@atykhonov
atykhonov / checkJenkins.sh
Created November 4, 2015 10:06 — forked from julianchurchill/checkJenkins.sh
A bash script to query a Jenkins server. Use like this: 'checkJenkins.sh <jobname>' and it will query the server with the given job name every 30s. Use like this: 'checkJenkins.sh <jobname> tmux' and it will query the server once and output tmux coloured messages appropriate to display in a tmux status bar. E.g. add this to your .tmux.conf 'set …
#!/bin/bash
CONSOLE_RED="\033[2;31m"
CONSOLE_GREEN="\033[2;32m"
CONSOLE_CLEAR="\033[0m"
JENKINS_SERVER=http://my_jenkins_server
JOB=$1
JOB_QUERY=/job/${JOB}
COINS = [1, 2, 5, 10] # it must be sorted
def withdraw(amount):
result = []
for coin in COINS[::-1]:
count = amount // coin
amount = amount - coin * count
for i in range(0, count):
result.append(coin)
return result
#!/usr/bin/env python
import argparse
gears = {}
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
gears[50] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
require 'formula'
class Swig < Formula
url 'http://downloads.sourceforge.net/project/swig/swig/swig-3.0.0/swig-3.0.0.tar.gz'
homepage 'http://www.swig.org/'
md5 '9c8278fad527dda4bf38edffe5acc394'
depends_on 'pcre'
def install
require 'formula'
class Swig < Formula
url 'http://downloads.sourceforge.net/project/swig/swig/swig-3.0.4/swig-3.0.4.tar.gz'
homepage 'http://www.swig.org/'
md5 '9cb8c0efda39dc6db5f85389e671fb59'
depends_on 'pcre'
def install
# Zenburn color theme for the color GNU ls utility.
# Ivaylo Kuzev <ivkuzev@gmail.com>, 2014
# Term Section
TERM Eterm
TERM ansi
TERM color-xterm
TERM con132x25
TERM con132x30
TERM con132x43
@atykhonov
atykhonov / travis.sh
Created February 25, 2014 17:40 — forked from rejeep/travis.sh
#!/bin/sh
# This script will setup Evm and Cask on Travis to use for Emacs Lisp testing.
#
# In .travis.yml, add Evm and Cask to PATH.
#
# - export PATH="/home/travis/.cask/bin:$PATH"
# - export PATH="/home/travis/.evm/bin:$PATH"
sudo mkdir /usr/local/evm