- 13" Macbook Pro 3.3 GHz i7 (late 2016)
- Microsoft Surface Book (2016)
- Dell up3216q 32" monitor
| Reference: | |
| Django/Postgres/Nginx/Gunicorn in Ubuntu: https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04 | |
| Encryption: https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 | |
| Where you see "user", "myproject" and "myprojectuser" replace that with what is relevent to what you are working on. | |
| User Setup | |
| $ ssh root@SERVER_IP_ADDRESS | |
| Complete login process |
| """ | |
| License: MIT - https://opensource.org/licenses/MIT | |
| ChromeLogger is a protocol which allows sending logging messages to the Browser. | |
| This module implements simple support for Django. It consists of two components: | |
| * `LoggingMiddleware` which is responsible for sending all log messages | |
| associated with the request to the browser. | |
| * `ChromeLoggerHandler` a python logging handler which collects all messages. |
| from __future__ import unicode_literals | |
| from django.db import models | |
| from django.db.models.fields.related_descriptors import ForwardManyToOneDescriptor # noqa | |
| class RelationNotLoaded(Exception): | |
| pass |
| # Create empty branch. | |
| git checkout --orphan review | |
| git rm -rf . | |
| git commit --allow-empty -m "Create empty branch" | |
| git push --set-upstream origin review | |
| # Create `project` branch from `master` current state. | |
| git checkout -b project | |
| git merge master --allow-unrelated-histories | |
| git push --set-upstream origin project |
| ''' | |
| This script brings up the entire stack of Docker containers, removing the current ones. | |
| Docker compose was tried for this task and it wasn't customisable enough. | |
| Docker cloud was tried (with stack files) and was buggy (failed to launch, no logs returned). | |
| Docker machine was tried, but it can't connect to existing servers only ones it created. | |
| Rancher was too heavy weight for the task, as the containers are lightweight in DigitalOcean. | |
| Kubernetes would've been too heavy weight for DigitalOcean. | |
| It was written in Powershell and worked. But then converting it to Bash was too much effort. | |
| Powershell for Linux is too much effort to install without a debian package (and none standard) |
| import android | |
| from android.app import AlertDialog | |
| from android.graphics import Color | |
| from android.graphics.drawable import ColorDrawable | |
| from android.os import AsyncTask | |
| from android.os import Looper | |
| from android.os import Handler | |
| from android.util import TypedValue | |
| from android.view import View | |
| from android.view import MenuItem |
| import django | |
| DEBUG, ROOT_URLCONF, DATABASES, SECRET_KEY = 1, 'pico', {'default': {}}, 'p' | |
| urlpatterns = [django.conf.urls.url(r'^(?P<name>\w+)?$', lambda request, | |
| name: django.http.HttpResponse('hello %s!' % (name or 'world')))] |