This file contains hidden or 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
augroup python_exec | |
autocmd! | |
autocmd FileType python nnoremap <buffer> <leader>r :<c-u>execute "w\|!python %"<cr> | |
autocmd FileType python nnoremap <buffer> <leader>p :<c-u>execute "w\|!flake8 %"<cr> | |
autocmd FileType python nnoremap <buffer> <leader>o :<c-u>execute "w\|!flake8 %>/tmp/errfile\|cf /tmp/errfile" | |
augroup END |
This file contains hidden or 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 | |
# vim: fileencoding=utf8:et:sw=4:ts=8:sts=4 | |
import os | |
import signal | |
import gevent, gevent.socket as gsock | |
def handler(signum, frame): |
This file contains hidden or 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
vagrant@vagrant-ubuntu-trusty-64:~$ grep -A2 pillar /etc/salt/minion | |
# The Salt pillar is searched for locally if file_client is set to local. If | |
# this is the case, and pillar data is defined, then the pillar_roots need to | |
# also be configured on the minion: | |
pillar_roots: | |
base: | |
- /srv/pillar | |
###### Security settings ##### | |
vagrant@vagrant-ubuntu-trusty-64:~$ cat /srv/pillar/top.sls | |
base: |
This file contains hidden or 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
# vim: fileencoding=utf8:et:sw=4:ts=8:sts=4 | |
import errno | |
import fcntl | |
import os | |
import resource | |
import select | |
import socket | |
from penguin import fds |
This file contains hidden or 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
# vim: fileencoding=utf8:et:sw=4:ts=8:sts=4 | |
from datahog import context, table, entity, prop, storage, pool | |
from django.conf import settings | |
from sentry.nodestore import base | |
BASE = 1 | |
context.set_context(BASE, table.ENTITY) |
This file contains hidden or 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
# | |
# creating a hub: | |
# | |
hub = junction.Hub( | |
[ # first argument: listening "sites" | |
"tcp://127.0.0.1:9000", # TCP/IP host:port | |
"udp://127.0.0.1:9000", # UDP/IP host:port | |
"tcp:///var/run/stream.sock", # STREAM /path/to/socketfile | |
"udp:///var/run/dgram.sock", # DGRAM /path/to/socketfile |
This file contains hidden or 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
python_run() { | |
$@ 2>.pythonrunerr | |
if [ $? -ne 0 ]; then | |
sed -nri -e '/^\s*File/N' -e 's/^\s*?File "(.*?)", line (.*?),.*\n(.*)$/\1:\2:\3/p' .pythonrunerr | |
vim -q .pythonrunerr -c cope | |
else | |
cat .pythonrunerr >&2 | |
fi | |
rm .pythonrunerr | |
} |
This file contains hidden or 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
FROM debian:wheezy | |
RUN apt-get update && apt-get -y upgrade | |
RUN apt-get install -y apache2 libapache2-mod-php5 php5-mysql php5-gd php5-curl | |
RUN /usr/sbin/a2enmod rewrite | |
ENV APACHE_RUN_USER www-data | |
ENV APACHE_RUN_GROUP www-data | |
ENV APACHE_LOG_DIR /var/log/apache2 |
This file contains hidden or 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
FROM debian:wheezy | |
RUN apt-get update && apt-get -y upgrade && apt-get install -y apache2 libapache2-mod-php5 php5-mysql php5-gd php5-curl | |
ADD koken /var/www/koken | |
RUN chown www-data:www-data -R /var/www/koken | |
ENV APACHE_RUN_USER www-data | |
ENV APACHE_RUN_GROUP www-data | |
ENV APACHE_LOG_DIR /var/log/apache2 |
This file contains hidden or 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 | |
# vim: fileencoding=utf8:et:sw=4:ts=8:sts=4 | |
from cStringIO import StringIO | |
import select | |
import pycurl | |
c1 = pycurl.Curl() |