Skip to content

Instantly share code, notes, and snippets.

View Levantado's full-sized avatar

Anton Oleinik Levantado

  • Georgia, Tbilisi
View GitHub Profile

Keybase proof

I hereby claim:

  • I am levantado on github.
  • I am levantado (https://keybase.io/levantado) on keybase.
  • I have a public key ASAz4vsargOtYYHnM-tY4QosxRkUM49e10XMpu2c_ScBnwo

To claim this, I am signing this object:

#!/bin/bash
# Script to automate the deployment of new private gitlab repos
# TODO: simplify and enhance error handling (already existing repos etc.)
# expand script to handle: public repos, deletion, re-naming
token=""
function usage {
echo "Usage: $0 -n name"
class Errors {
constructor() {
this.errors = {};
}
get(field) {
if (this.errors[field]) {
return this.errors[field]
}}
{
"presets": [
[
"env",
{
"loose": true,
"modules": "commonjs",
"targets": {
"browsers": [
"> 1%",
@Levantado
Levantado / custom_validators.py
Last active September 9, 2019 15:58
Flask WTF custom validator
from wtforms.validators import ValidationError
class UniqChecker:
def __init__(self, model, fieldname, message=None):
if message:
self.message = message
else:
self.message = "You shall no pass"
self.model = model
@Levantado
Levantado / app.py
Created August 28, 2017 15:19 — forked from zaccrites/app.py
Flask Application Factory
import jinja2
from flask import Flask, render_template, request, redirect, url_for
from flask.ext.sqlalchemy import SQLAlchemy
from . import formatting
from .config import get_config
db = SQLAlchemy()
appdirs==1.4.3
asn1crypto==0.22.0
attrs==16.3.0
Automat==0.5.0
cffi==1.10.0
chardet==3.0.2
click==6.7
constantly==15.1.0
cryptography==1.8.1
cssselect==1.0.1
@Levantado
Levantado / Sheme
Created December 4, 2016 18:27
Gulp 4 setup gulpFile, gulpPath, package.json(dev-depend), structure.
File structure
app.js
bin
www
app
_coffee
_sass
template
images
index.html