Skip to content

Instantly share code, notes, and snippets.

View f213's full-sized avatar

Fedor Borshev f213

View GitHub Profile
# Put it to .github/workflows/stale.yml
name: Close stale issues and pull requests
on:
workflow_dispatch:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
# 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 17:09
Complex django 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
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 January 6, 2019 10:11
Fabfile example
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
from django.core.validators import EmaiLValidator
def validate_email(self, email):
v = EmaiLValidator()
try:
v(email)
except ValidationError:
return None
return email

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 March 22, 2016 00:49
Stupidly modify old Apple Mail plugins to fit you current system version
#!/bin/bash
#
# Copyright (c) 2015, Fedor Borshev, <[email protected]>
#
# 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 September 15, 2015 16:55
Stupidly modify old Apple Mail plugins to fit you current system version
#!/bin/bash
#
# Copyright (c) 2015, Fedor Borshev, <[email protected]>
#
# 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