<author>/<type>/<ticket>/<title>
revett/feature/24101/skeleton-service-for-email-sender
| #!/usr/bin/env python | |
| # Compare a file on S3 to see if we have the latest version | |
| # If not, upload it and invalidate CloudFront | |
| import fnmatch | |
| import os | |
| import boto | |
| import pprint | |
| import re |
| # Extremely basic development setup to serve the current directory at http://localhost:9001 | |
| # Start nginx in this directory with `nginx -p . -c nginx.conf` | |
| # Stop nginx with `nginx -p . -s stop` | |
| events {} | |
| http { | |
| # Serve files with correct mimetypes on OSX | |
| # location may have to be adjusted depending on your OS and nginx install | |
| include /usr/local/etc/nginx/mime.types; |
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
| import time | |
| from http.server import BaseHTTPRequestHandler, HTTPServer | |
| HOST_NAME = 'localhost' | |
| PORT_NUMBER = 9000 | |
| class MyHandler(BaseHTTPRequestHandler): | |
| def do_HEAD(self): | |
| self.send_response(200) |
| #!/usr/bin/env python | |
| import boto | |
| import sys, os | |
| from boto.s3.key import Key | |
| from boto.exception import S3ResponseError | |
| DOWNLOAD_LOCATION_PATH = os.path.expanduser("~") + "/s3-backup/" | |
| if not os.path.exists(DOWNLOAD_LOCATION_PATH): |
| mapboxgl.accessToken = 'pk.eyJ1IjoibW91cm5lciIsImEiOiJWWnRiWG1VIn0.j6eccFHpE3Q04XPLI7JxbA'; | |
| console.log('Version: ' + mapboxgl.version); | |
| const container = document.createElement('div'); | |
| container.style.width = '1200px'; | |
| container.style.height = '700px'; | |
| document.body.appendChild(container); |
| package auth | |
| import ( | |
| "context" | |
| "net/http" | |
| "strings" | |
| "google.golang.org/grpc/metadata" | |
| "github.com/andela/micro-api-gateway/pb/authorization" |
| import rest_framework.serializers | |
| import graphql.execution.executor | |
| from django.db.models import Model | |
| from graphene.utils import str_converters | |
| from functools import lru_cache | |
| @lru_cache(maxsize=None) |