(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {
| import 'dart:convert'; | |
| import 'dart:math'; | |
| import 'dart:io'; | |
| class Token { | |
| Map<String, dynamic> parseJwt(String token) { | |
| final parts = token.split('.'); | |
| if (parts.length != 3) { | |
| throw Exception('invalid token'); | |
| } |
| // SPDX-License-Identifier: MIT | |
| // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) | |
| pragma solidity ^0.8.0; | |
| import "../utils/Context.sol"; | |
| /** | |
| * @dev Contract module which provides a basic access control mechanism, where | |
| * there is an account (an owner) that can be granted exclusive access to |
| # views.py | |
| from myproject.myfunctions import upload_profile_picture | |
| def profile_picture(request): | |
| # setup (checking for post, checking if the | |
| # user is authenticated, etc.) | |
| user = request.user | |
| pic_file = request.FILES['profile_picture'] | |
| result_url = upload_profile_picture(pic_file) |
(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {
| ############################################################ | |
| # Dockerfile to build Python | Django | Mysql small container images | |
| # Based on Linux Alpine | |
| ############################################################ | |
| # Set the base image | |
| FROM alpine | |
| # set work directory | |
| WORKDIR /usr/src/app |