Skip to content

Instantly share code, notes, and snippets.

Avatar

Fedor Borshev f213

View GitHub Profile
View docker-compose-example.yml
# This is a docker-compose stub for django template at https://github.com/f213/django
version: '2'
services:
postgres:
image: postgres:12-alpine
ports:
- 5432:5432
redis:
@f213
f213 / Dockerfile
Created May 25, 2019
Complex django dockerfile
View Dockerfile
FROM gdml/django-base:1.0.8 as base
WORKDIR /srv
ADD . /srv/
RUN ./manage.py compilemessages
VOLUME /srv
HEALTHCHECK CMD wget -q -O /dev/null http://localhost:8000/healthchecks/####/ --header "Host: ###.gdml.ru" || exit 1
View circle-config.yml
version: 2
defaults: &defaults
docker:
- image: circleci/python:3.6-stretch
environment:
- DATABASE_URL=postgres://root:@postgres:5432/circle_test
- CELERY_BACKEND=redis://redis:6379
- ELASTICSEARCH_HOST=http://elasticsearch:9200
jobs:
@f213
f213 / fabfile.py
Created Jan 6, 2019
Fabfile example
View fabfile.py
from fabric.api import env, run as fabric_run
from fabric.contrib.project import rsync_project
env.app_path = '/home/backend'
env.user = 'circle'
env.use_ssh_config = True
env.disable_knodwn_hosts = True
env.colorize_errors = True
View sticks-and-shit-email-validation-that-bypasses-django-built-in-validation.py
from django.core.validators import EmaiLValidator
def validate_email(self, email):
v = EmaiLValidator()
try:
v(email)
except ValidationError:
return None
return email
View keybase.md

Keybase proof

I hereby claim:

  • I am f213 on github.
  • I am f213 (https://keybase.io/f213) on keybase.
  • I have a public key ASBkPCEdw0xubK53mpwDDHFHFn5-KO5q5R4gMAAeosViFQo

To claim this, I am signing this object:

@f213
f213 / repack-mail-bundle.sh
Last active Mar 22, 2016
Stupidly modify old Apple Mail plugins to fit you current system version
View repack-mail-bundle.sh
#!/bin/bash
#
# Copyright (c) 2015, Fedor Borshev, <f@f213.in>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
@f213
f213 / repack-mail-bundle.sh
Created Sep 15, 2015
Stupidly modify old Apple Mail plugins to fit you current system version
View repack-mail-bundle.sh
#!/bin/bash
#
# Copyright (c) 2015, Fedor Borshev, <f@f213.in>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
You can’t perform that action at this time.