- based on small Digital Ocean VPS (1CPU / 1GB RAM) with Ubuntu 16.04
- SSH keys are recommended, but not described here
- (sub) domain name necessary for SSL certificate
Login as "root"
{ | |
"institution": 1, | |
"template_id": 1, | |
"document_type": "PR", | |
"date_issued": "2021-08-03", | |
"number": "2019751824053621", | |
"pin_code": "2019751824053621", | |
"pin_category": "SCHOOL FEES", | |
"payment_amount": 1000, | |
"payment_currency": "NGN", |
# -*- encoding: utf-8 -*- | |
# requires a recent enough python with idna support in socket | |
# pyopenssl, cryptography and idna | |
from OpenSSL import SSL | |
from cryptography import x509 | |
from cryptography.x509.oid import NameOID | |
import idna | |
from socket import socket |
""" | |
#Disclaimer | |
- Use with caution | |
- Don't be evil | |
- Respect your users | |
""" | |
class FingerPrintMiddleware(object): | |
def process_request(self, request): | |
import hashlib |
from django.utils.text import gettext_lazy as _ | |
from rest_framework import serializers | |
from rest_framework_simplejwt.tokens import RefreshToken, TokenError | |
class RefreshTokenSerializer(serializers.Serializer): | |
refresh = serializers.CharField() | |
default_error_messages = { | |
'bad_token': _('Token is invalid or expired') | |
} |
Here's an example application that uses the pattern detailed below: https://github.com/tantastik/talent-curator
This document is an attempt to describe the first step of a large project structure with flask and some basic modules:
Please feel free to fix and add your own tips.
{ | |
"name": "vbvcomplete", | |
"data": { | |
"data": { | |
"status": "successful", | |
"txRef": "shop", | |
"amount": "5000" | |
} | |
}, | |
"respcode": "00", |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
pragma solidity ^0.4.16; | |
contract AcademicRegistry { | |
address admin; | |
enum Permissions { | |
CanEnrollCandidate, | |
CanUpdateProgram, | |
CanUpdateUnits, | |
CanUpdateStaff, | |
CanClearCandidate, |