Skip to content

Instantly share code, notes, and snippets.

View IvanAnishchuk's full-sized avatar

Ivan Anishchuk IvanAnishchuk

View GitHub Profile
@IvanAnishchuk
IvanAnishchuk / coverage_runserver.py
Created March 8, 2017 16:54
Auto-coverage runserver alternative for Django, killable by request
#!/usr/bin/env python2
# Not py3-compatible in this form
from __future__ import print_function
import signal
import sys
import thread
import coverage
from django.conf import settings
@IvanAnishchuk
IvanAnishchuk / traceback
Created July 8, 2016 12:25
DOT traceback
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 57, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
return self.dispatch(request, *args, **kwargs)
@IvanAnishchuk
IvanAnishchuk / nginx.conf
Created October 21, 2015 19:54 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4aysQE2pfdfr8+tQ6vNghn7mt/BEHZgk/C6ZP66FNO2I4Uzax+UpBkjtA2O2cQ5vfdgY8zaOXpiN1FUtswTume2Dn+DuA4wpJs5QeceXohj4IqjRUD/+fnmBDxXANgSnqJUL/YfAn4Q98kXFNhklHOVDzHr/Ov8+bufPVljiGQ9sD0GejRrEWQqbUbezfHrgG0sKkY69EBhVUT8hhQJ9EsKemJK6A8YHlhaOudzZfH93RNOA4Kfuuhyqyd18dCLpNpbbzZr1M9SD8B2n/311/10u1onA2IM06XwXyZSzVmO+cu7+FJI0kktOtWerc/3iyOs3rAE93B4OZoG7TwT/3 [email protected]
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
</CORSRule>
</CORSConfiguration>