Skip to content

Instantly share code, notes, and snippets.

View sa2ajj's full-sized avatar

Mikhail Sobolev sa2ajj

  • Helsinki, Finland
View GitHub Profile
vault write --format=json \
ca-hot/roles/test-role \
allowed_domains=${hot_domain} \
allow_subdomains=false \
server_flag=false \
client_flag=false \
email_protection=true \
key_type=ec \
key_bits=256 \
basic_constraints_valid_for_non_ca=true \
from twisted.internet import defer
from buildbot.process.buildstep import BuildStep
from buildbot.status.results import FAILURE
from buildbot.status.results import SUCCESS
class CheckForFailures(BuildStep):
"""
this step fails when any of the given build steps fail
@sa2ajj
sa2ajj / CMakeLists.txt
Last active September 13, 2016 02:48
relative paths all the way?
cmake_minimum_required(VERSION 3.6)
project(blah)
add_executable(
blah
main.cpp
)
@sa2ajj
sa2ajj / gist:13f86d3437eb9109af8c
Last active August 29, 2015 14:18
Simple test plain SMTP + STARTTLS + AUTH works
#! /usr/bin/python -tt
from smtplib import SMTP
from getpass import getpass
def main():
"""
entry point
"""
### Keybase proof
I hereby claim:
* I am sa2ajj on github.
* I am sa2ajj (https://keybase.io/sa2ajj) on keybase.
* I have a public key whose fingerprint is 7D8C 7CC9 0D15 2DE6 DC47 E9A8 4D7A 78A7 8CE6 39F1
To claim this, I am signing this object:
@sa2ajj
sa2ajj / human_log.py
Last active August 29, 2015 14:11 — forked from steinim/human_log.py
FIELDS = ['cmd', 'command', 'start', 'end', 'delta', 'msg', 'stdout', 'stderr']
def human_log(res):
if type(res) == type(dict()):
for field in FIELDS:
if field in res.keys():
encoded_field = res[field].encode('utf-8')
print '\n{0}:\n{1}'.format(field, encoded_field)
# Documentation for HAProxy
# http://code.google.com/p/haproxy-docs/w/list
# http://haproxy.1wt.eu/download/1.2/doc/architecture.txt
# NOTES:
# open files limits need to be > 256000, use ulimit -n to set (on most POSIX systems)
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
$ docker help run
Usage: docker run [OPTIONS] IMAGE COMMAND [ARG...]
Run a command in a new container
-a=map[]: Attach to stdin, stdout or stderr.
-d=false: Detached mode: leave the container running in the background
-e=[]: Set environment variables
-h="": Container host name
@sa2ajj
sa2ajj / gist:4517693
Last active December 11, 2015 00:38
a simple document that uses erlangdomain
=======
Testing
=======
This page should have at least something...
.. erl:module:: test
.. erl:function: my_function(Arg1, Arg2)