Skip to content

Instantly share code, notes, and snippets.

View klen's full-sized avatar

Kirill Klenov klen

View GitHub Profile

An Ansible summary

Patterns

  • all (or *)
  • hostname: foo.example.com
  • groupname: webservers
  • or: webservers:dbserver
  • exclude: webserver:!phoenix
  • intersection: webservers:&staging
@klen
klen / configure
Last active September 3, 2021 05:31
OSX vim +python +python3 (pyenv)
#! /bin/sh
# This is just a stub for the Unix configure script, to provide support for
# doing "./configure" in the top Vim directory.
PY_CONFIG=`pyenv prefix 2.7.11/lib/python2.7/config`
PY3_PREFIX=`pyenv prefix 3.4.4`
PY3_CONFIG=`$PY3_PREFIX/bin/python-config --configdir`
cd src && exec ./configure \
"""Provide information about opportunities."""
from collections import OrderedDict
import datetime as dt
import json
from flask import request
from flask_restler import route
from flask_restler.peewee import Filter, ModelFilters
from peewee import PostgresqlDatabase, SQL, Clause
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import os
import sys
import re
def main(additional=''):
re_author = re.compile(r'^.*?\((.*?)\s*\d{4}-\d{2}-\d{2}.*')
authors = {}
for filename in os.popen('git ls-tree --name-only -r HEAD'):
@klen
klen / Cell.h
Created November 9, 2013 12:17
Objective-C tutorial
//
// Cell.h
// Cell
//
// Created by Kirill Klenov on 09.11.13.
// Copyright (c) 2013 Kirill Klenov. All rights reserved.
//
#import <Foundation/Foundation.h>
@klen
klen / City.h
Created November 9, 2013 10:15
Objective C - tutorial
//
// City.h
// city
//
// Created by Kirill Klenov on 09.11.13.
// Copyright (c) 2013 Kirill Klenov. All rights reserved.
//
#import <Foundation/Foundation.h>
#!/bin/sh
#
# Kirill Klenov
# Oct 27, 2013
#
# Usage: Add it to your PATH and `git submodule-remove path/to/submodule`.
ROOT=$(git rev-parse --show-toplevel)
SUBMODULE_NAME=$(echo "$1" | sed 's/\/$//'); shift
test -z "$SUBMODULE_NAME" && echo "You should define path to submodule." 1>&2 && exit 1
// Push payload scheme
// JSON schema: http://json-schema.org/
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Push payload specification",
"type": "object",
"oneOf": [
{
"$ref": "#/definitions/ping",
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import Queue
import threading
import sys
import traceback
from pylint.lint import Run
from pylint.utils import UnknownMessage
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import Queue
import threading
import sys
import traceback
from pylint.lint import Run
from pylint.utils import UnknownMessage