In project root directory the create a folder called '.github'
Create a file in the format workflows/django.yml
############################################################ | |
# 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 |
(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {
# 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) |
// 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 |
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'); | |
} |