Skip to content

Instantly share code, notes, and snippets.

Avatar
🚢
shippin'

Victor Miroshnikov superduper

🚢
shippin'
View GitHub Profile
@superduper
superduper / tornado-unix-socket.py
Last active Oct 11, 2019
Tornado web server with unix socket support
View tornado-unix-socket.py
import tornado.ioloop
import tornado.web
from tornado.httpserver import HTTPServer
from tornado.options import options, define
from tornado.netutil import bind_unix_socket
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write("Hello, world")
@superduper
superduper / SslClientAuth.hs
Created Sep 3, 2015
Example how to use wreq with ssl
View SslClientAuth.hs
{-# LANGUAGE OverloadedStrings #-}
module Network.HttpSSL (
postSSL
, SSLOptions (..)
) where
{-
build-depends:
wreq
, HsOpenSSL
@superduper
superduper / update-django-cms-to-use-django-1.10.md
Last active Oct 7, 2017
Updating django-cms to use django 1.10
View update-django-cms-to-use-django-1.10.md

Upgrading djangocms-installer scaffolded project django version

Abstract

I used djangocms-installer to bootstrap django-cms project. Installer saves a great deal of time spent on intialization but its requirements.txt are outdated. As of Feb 15 2016 it enforces django<1.9 and other package requirements. This is because django-cms didn't officially support django>1.10 at a time last djangocms-installer version was released.

This article describes how I updated generated project to support django=>1.10.

Upgrading

View gist:17731ffdd4b6c9a017fa1a071f970f28
### Keybase proof
I hereby claim:
* I am superduper on github.
* I am viktorm (https://keybase.io/viktorm) on keybase.
* I have a public key ASD7PizfMfaD1wFUaqY338h0TEp1yjIE9Z-q9VNsv_yFjwo
To claim this, I am signing this object:
View spicy-chai.js
// http client
const chai = require('chai');
const chaiHttp = require('chai-http');
chai.use(chaiHttp);
const should = chai.should();
/*
* chai enhanced request factory
*
* Allows to transform requests before sending. Add transformer functions by
You can’t perform that action at this time.