Skip to content

Instantly share code, notes, and snippets.

View superduper's full-sized avatar
🚢
shippin'

Viktor Miroshnikov superduper

🚢
shippin'
View GitHub Profile
// 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
### 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:
@superduper
superduper / update-django-cms-to-use-django-1.10.md
Last active October 7, 2017 09:20
Updating django-cms to use django 1.10

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

@superduper
superduper / SslClientAuth.hs
Created September 3, 2015 23:51
Example how to use wreq with ssl
{-# LANGUAGE OverloadedStrings #-}
module Network.HttpSSL (
postSSL
, SSLOptions (..)
) where
{-
build-depends:
wreq
, HsOpenSSL
@superduper
superduper / tornado-unix-socket.py
Last active October 11, 2019 12:02
Tornado web server with unix socket support
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")