Skip to content

Instantly share code, notes, and snippets.

View slav0nic's full-sized avatar

Sergey Maranchuk slav0nic

View GitHub Profile
@slav0nic
slav0nic / uwsgi_plugin_build.md
Last active March 10, 2024 02:20
rebuild system uwsgi python3 plugin with more recent python version
# apt install uwsgi uwsgi-core python3.8-dev
# apt install uwsgi-src
# cd  /usr/src/uwsgi
# PYTHON=python3.8 uwsgi --build-plugin "plugins/python python38"
# cp python38_plugin.so /usr/lib/uwsgi/plugins/
# uwsgi --plugin python38 ...
@slav0nic
slav0nic / custom_views.py
Created September 5, 2016 12:03
Django oscar authoprize.net backend
from django.db import transaction
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from django.views.generic import DeleteView
from oscar.core.loading import get_model
from apps.oscar_authorize.facade import Facade
@slav0nic
slav0nic / opbeat_logger.py
Last active October 3, 2016 19:24
Opbeat logger for twisted
from opbeat import Client
from twisted.logger import ILogObserver
from zope.interface import implementer
@implementer(ILogObserver)
class OpbeatLogObserver(object):
"""
A twisted log observer which logs errors to Opbeat service.
"""
@slav0nic
slav0nic / backports.pref
Last active May 26, 2022 08:36
debian bullseye sources.list
Package: *
Pin: release n=bullseye-backports
Pin-Priority: 900