Skip to content

Instantly share code, notes, and snippets.

Fedor Borshev f213

Block or report user

Report or block f213

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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
@f213
f213 / gist:645738b971966b09239c
Created Jul 5, 2015
auto-upload local file to remote host via ftp
View gist:645738b971966b09239c
var gulp = require('gulp'),
ftp = require( 'vinyl-ftp' );
var files = [
'.htaccess'
];
gulp.task ('put', function() {
var conn = ftp.create ( {
host: 'host',
@f213
f213 / Gulpfile.js
Created Jun 16, 2015
Gulpfile for building my spacious theme for hexo
View Gulpfile.js
'use strict';
var gulp = require('gulp'),
$ = require('gulp-load-plugins')(),
runSequence = require('run-sequence');
var cdnizerOptions = {
defaultCDN: 'cdnjs',
files: [
{
View RedmineAutoLink.user.js
You can’t perform that action at this time.