Статья о решении https://tjournal.ru/69092-nastroyka-sobstvennogo-vpn-servera-v-dva-klika
fileTypes: [ | |
"apib" | |
] | |
foldingStartMarker: ''' | |
(?x) | |
(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\\b.*?> | |
|<!--(?!.*-->) | |
|\\{\\s*($|\\?>\\s*$|//|/\\*(.*\\*/\\s*$|(?!.*?\\*/))) | |
) | |
''' |
Git hook post-merge and post-checkout for sync modification time to last commit time. | |
You can download scripts manually and install them yourself, or you can install it with command | |
> curl -s https://gist.githubusercontent.com/phpdude/9464925/raw/install | sh | |
This command will download post-merge script, chmod it, and create post-checkout symlink to post-merge hook. | |
You can also start this script manually with environment variable $GIT_MERGE_LIMIT=100 to updated timestamp of last 100 commits for example. |
version: '2' | |
services: | |
db: | |
restart: always | |
image: postgres | |
environment: | |
- POSTGRES_USER=project | |
- POSTGRES_PASSWORD=project | |
volumes: |
Can do it :) |
from django.contrib.admin import ModelAdmin, register | |
from django.db.models import IntegerField | |
from django.db.models.functions import Cast | |
from django.db.models.expressions import Func, Value | |
from .models import Foo | |
class RegexpMatches(Func): | |
function = 'REGEXP_MATCHES' |
EC2 only lets you export instances as VMWare-compatible OVA files if you originally imported that instance from an OVA. Presumably it preserves the metadata and XML gubbins for the instance, and just wraps it up again using that metadata on export.
In order to provision arbitrary VMs in an OVA-exportable way, we abuse the volume snapshots on one VM.
- Make a fresh install of ubuntu server or whatever your base distro is, in VMWare, export as OVA file. (single disk only!)
- Untar the OVA and import the VMDK file into ec2 using
ec2-instance-import
onto an HVM instance type (ie, no xen kernel needed)
Adds Django full subdomains urls upport for urlpatterns and reverse resolving. | |
Requires installation into settings.py | |
Allows you route and generate views various urls. | |
''' | |
Example: | |
'domain.com' -> '' | |
'domain.com/doc' -> 'doc' |
Ремарка: все тесты были на Ubuntu Server 14.04, так же все это справедливо для версии openssl >= 1.0.0. Не советую использовать эту сборку curl для всего что угодно, так как она может быть сильно хуже по возможностям стандартной, так как я компилировал утилиту всего с 1 флагом, и соответственно мог упустить уйму важных ее возможностей. Советую использовать ее как доп утилиту в папке проекта или где попало, не советую в продакшен использовать везде где попало, ну или если с головой подходить к флагам компиляции и сделать это хорошо и по настоящему, у меня такой цели не стоит, делаю на скорую руку, просто как рабочее решение.
-
Устанавливаем openssl
apt-get install -y openssl
-
Настраиваем в linux curl программе (не путать с библиотеками языков типа php_curl.so, там уже сами, но принцип тот же) поддержку криптографических движков:
GOST2001-GOST89-GOST89 >
It is simplest email backend for Django which supports async email delivery in parallel threads. Keep it simple! It has various analogs, you can google for it yourself.
Django async email backend requires futures library. So you need to install it with pip install futures
.