This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import asyncio | |
logging | |
socket | |
struct) | |
(setv *logger-format* "%(asctime)s %(message)s" | |
log (.getLogger logging)) | |
(.basicConfig logging :format *logger-format* :datefmt "[%H:%M:%S]") | |
(.setLevel log logging.INFO) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# requirements: ansible, libtmux | |
# you must set env var INVENTORIES_PATH | |
import argparse | |
from ansible.inventory import Inventory | |
import libtmux as tmux | |
import os | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Name: Base16 Solarized Light | |
Author: Ethan Schoonover (http://ethanschoonover.com/solarized) | |
CodeMirror template adapted for IPython Notebook by Nikhil Sonnad (https://github.com/nsonnad/base16-ipython-notebook) | |
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools) | |
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals, absolute_import, print_function | |
import gevent | |
import subprocess | |
from functools import partial | |
from six import int2byte, StringIO | |
import os | |
import logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location / { | |
more_set_headers 'Access-Control-Allow-Origin: $http_origin' 'Access-Control-Allow-Credentials: true'; | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Max-Age' 1728000; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT'; | |
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since'; | |
add_header 'Content-Length' 0; | |
add_header 'Content-Type' 'text/plain charset=UTF-8'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Author: A. Ponimaskin | |
from __future__ import unicode_literals, absolute_import, print_function | |
from pymongo import MongoClient | |
import docker | |
from six.moves import range | |
import argparse | |
from time import sleep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
sudo rm -rf $PWD/devenvs/*/db/* | |
sudo rm -rf $PWD/devenvs/*/mongodb.conf | |
sudo rm -rf $PWD/devenvs/*/supervisord.conf | |
sudo ln $PWD/devenvs/mongodb.conf $PWD/devenvs/n1/ | |
sudo ln $PWD/devenvs/mongodb.conf $PWD/devenvs/n2/ | |
sudo ln $PWD/devenvs/mongodb.conf $PWD/devenvs/n3/ | |
sudo ln $PWD/devenvs/mongodb.conf $PWD/devenvs/n4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
example from sqlalchemy/examples/vertical ported to one column storage | |
with casts. | |
""" | |
from sqlalchemy.orm.interfaces import PropComparator | |
from sqlalchemy.ext.hybrid import hybrid_property | |
import logging |
NewerOlder