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
)
# 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)
@sa2ajj
sa2ajj / gist:993823
Created May 26, 2011 19:12
strange error
Erlang R14A (erts-5.8) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.8 (abort with ^G)
1> P = [{filename,"Filename"},
1> {maintainer,"Maintainer"},
1> {description,"Description"},
1> {package,"Package"},
1> {section,"Section"},
1> {'installed-size',"Installed-Size"},
1> {priority,"Priority"},
@sa2ajj
sa2ajj / gist:956717
Created May 5, 2011 08:12
atom to string conversion benchmark
-module(msr_subst).
-export([doit/0, props/0]).
doit() ->
timer:start(),
Data = data(),
io:format("check_prop: ~p~n", [check_prop(Data)]),
io:format("check_dict: ~p~n", [check_dict(Data)]),
io:format("check_match: ~p~n", [check_match(Data)]),
@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
"""