Skip to content

Instantly share code, notes, and snippets.

View voroninman's full-sized avatar
🇺🇦

Viktor Voronin voroninman

🇺🇦
View GitHub Profile
brew cask install connectiq
brew cask install java
git clone git@github.com:dennybiasiolli/garmin-connect-iq.git
cd garmin-connect-iq
openssl genrsa -out developer_key.pem 4096 && \
openssl pkcs8 -topk8 -inform PEM -outform DER -in developer_key.pem -out developer_key.der -nocrypt && \
rm developer_key.pem
bash $(readlink $(type monkeyc)) \
-d fr735xt \
-o AnalogDigital.prg \
from datetime import datetime, timedelta
TODAY = datetime.now().date()
def years_ago(date, years=25):
try:
date_past = date.replace(year=date.year-years)
except ValueError:
# https://hub.docker.com/r/voroninman/quakejs-server/
FROM node:latest
WORKDIR /quakejs
RUN git clone https://github.com/inolen/quakejs.git .
RUN npm install
RUN ln -s /quakejs/base/baseq3/server.cfg /server.cfg
EXPOSE 27960
ENTRYPOINT node build/ioq3ded.js +set fs_game baseq3 +set dedicated 2 +exec server.cfg
from hashlib import md5
from collections import Counter
BETA_ROLL_OUT_PERSANTAGE = 10
def hash_func(key):
return sum(map(ord, md5(key).hexdigest()))
class Category(object):
def __init__(self, slug=None):
self.slug = slug
def __repr__(self):
return self.slug
categories = [
Category(slug='b'),
Category(slug='d'),
@voroninman
voroninman / save_postgres_docs_as_html_file.py
Last active February 18, 2017 16:37
Download and save PostgreSQL documentation as a single HTML-page replacing URLs with HTML anchors
"""
Download and save PostgreSQL documentation as a single
HTML-page replacing URLs with HTML anchors.
To convert the resulting HTML file to an e-book use
appropriate online services.
Be carful opennig it in a browser. The resulting HTML
could be heavy.
"""
import re;p=lambda n:not re.match(r'^1?$|^(11+?)\1+$','1'*n)
d=lambda s:s==s[::-1]
def golf(n):
while 1:
n+=1
if p(n)*d(str(n)):return n
from functools import reduce
checkio = lambda number: reduce(lambda x, y: x * y,
filter(lambda digit: digit,
map(int, str(number))))
assert checkio(1) == 1, 'The simplest one'
assert checkio(10) == 1, 'With zero'
assert checkio(234) == 24, '234'

Engineering Excellence Scorecard

Process Questions
Product/Project Management
  • Do we have clearly articulated goals and measures of success for every project?
  • Do we have clearly articulated scope for every project?
Development
  • Do we have predictable and repeatable process?
  • Do we have clear doneness criteria?
  • Do we have any impediments to productivity?
Source Code Management
  • Do we have an effective branching model?
Release
  • Do we have zero downtime release process?
  • Do we have continius integration?
QA
  • Do we have 100% code review coverage?
  • Do we have 80%+ automated unit test coverage?
  • Do we have 80%+ automated integration test coverage?
  • Do our staging environments adequately represent production environments?
Monitoring Are we alerted to all critical issues?Are we warned before issues b
import sys
import xml.etree.cElementTree as et
def main(file_path):
f = open(file_path, 'r')
iter = et.iterparse(f)
print '<html><meta charset="utf8">'
for event, elem in iter: