Skip to content

Instantly share code, notes, and snippets.

View klizhentas's full-sized avatar
Be kind

Alexander Klizhentas klizhentas

Be kind
View GitHub Profile
from mailgun/erlbase:latest
ENV DEBIAN_FRONTEND noninteractive
ENV RIAK_VERSION 1.4.1
ENV RIAK_MAJOR_VERSION 1.4
ENV PATH /usr/local/lib/erlang/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
run apt-get -y -q install libc6-dev-i386
run wget http://s3.amazonaws.com/downloads.basho.com/riak/$RIAK_MAJOR_VERSION/$RIAK_VERSION/riak-$RIAK_VERSION.tar.gz -O /tmp/riak-$RIAK_VERSION.tar.gz
from mailgun/base:latest
ENV REDIS_VERSION 2.6.13
run wget http://redis.googlecode.com/files/redis-$REDIS_VERSION.tar.gz -O /opt/redis-$REDIS_VERSION.tar.gz
run cd /opt && tar -xzvf /opt/redis-$REDIS_VERSION.tar.gz
run cd /opt/redis-$REDIS_VERSION && make
run mv /opt/redis-$REDIS_VERSION /opt/redis
run mkdir -p /var/log/redis/ /var/run/redis/ /var/lib/redis/
ADD ./conf /opt/redis
@klizhentas
klizhentas / gist:7388993
Created November 9, 2013 19:39
Data loss
DEBUG:mgcore.transports.http:SASHA: debug: Traceback (most recent call last):
File "/home/mg/mgcore-py/lib/python2.7/site-packages/Twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/internet/endpoints.py", line 124, in connectionLost
return self._wrappedProtocol.connectionLost(reason)
File "/home/mg/mgcore-py/lib/python2.7/site-packages/Twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/web/_newclient.py", line 908, in dispatcher
return func(*args, **kwargs)
File "/home/mg/mgcore-py/lib/python2.7/site-packages/Twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/web/_newclient.py", line 1574, in _connectionLost_WAITING
self._disconnectParser(reason)
File "/home/mg/mgcore-py/lib/python2.7/site-packages/Twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/web/_newclient.py", line 1496, in _disconnectParser
parser.connectionLost(reason)
--- <exception caught here> ---
<!--
MDMN88N
ODMMDNDNMNN
M8DMNNMMMNNN
M7DMID8ZOMNMN
N8??NODIN7MNIZ?N
Z~==?I7$O78D7NDZ8M8NM
O~+II77?7??8D8OOO8DD8D8N$MOI$=N
:~8D$~~?7Z$7DZZ8DDDNN888N8N88I~$$+~+N
M~DD8ZZ8Z$77I$ODNNNNNNN8D8MNN8++?$I?7D8OO+
// simplest api possible
http('http://localhost:5000', 'http://localhost:5001')
// same but using discovery service
http(etcd('upstreams/.*'))
// adding tls
http({
tls: filesystem('/home/certificates/*.cert'),
port: 443,
@klizhentas
klizhentas / parser.py
Created May 7, 2014 00:37
Bind XML statistics parser
import sys
import time
import requests
import argparse
from datetime import datetime
from lxml import etree
parser = argparse.ArgumentParser()
@klizhentas
klizhentas / main.go
Created May 11, 2014 04:33
Benchmark path router
package main
import (
"bytes"
"fmt"
. "github.com/mailgun/vulcan/location"
. "github.com/mailgun/vulcan/netutils"
. "github.com/mailgun/vulcan/request"
. "github.com/mailgun/vulcan/route/pathroute"
"io"
@klizhentas
klizhentas / revert.sh
Created June 18, 2014 05:47
Quickly switch from Godeps to original imports in dev mode
find . -iregex .*go | xargs sed -i 's:".*Godeps/_workspace/src/::g'
deployment-py)[DFW]mg@monitor ~/chef-repo: librarian-chef install
Installing ark (0.8.0)
Installing java (1.22.0)
Installing ant (1.0.2)
Installing iptables (0.13.2)
Installing logrotate (1.6.0)
Installing pacman (1.1.1)
Installing apache2 (1.10.4)
Installing apt (2.4.0)
/usr/lib/ruby/1.8/net/protocol.rb:135:in `sysread': end of file reached (EOFError)
worker3.dfw.definbox.com [2014-07-12T00:18:36+00:00] WARN: Current package[libpcre3-dev]: /var/chef/cache/cookbooks/mgnginx/recipes/default.rb:14:in `from_file'
worker3.dfw.definbox.com [2014-07-12T00:18:36+00:00] INFO: HTTP Request Returned 404 Not Found: No routes match the request: /search/node
worker3.dfw.definbox.com
worker3.dfw.definbox.com ================================================================================
worker3.dfw.definbox.com Recipe Compile Error in /var/chef/cache/cookbooks/etcd/recipes/cluster.rb
worker3.dfw.definbox.com ================================================================================
worker3.dfw.definbox.com
worker3.dfw.definbox.com
worker3.dfw.definbox.com Net::HTTPServerException
worker3.dfw.definbox.com ------------------------