Skip to content

Instantly share code, notes, and snippets.

View Ivan-Feofanov's full-sized avatar
🐢

Ivan Feofanov Ivan-Feofanov

🐢
View GitHub Profile
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Ivan Feofanov",
"label": "Senior Backend Developer at GoStudent",
"image": "",
"email": "feofanov@gmail.com",
"phone": "+995591029041",
"url": "",
"summary": "I am a senior backend developer with strong architect and DevOps skills so I can provide the entire service life cycle from design to deployment and maintenance. I can clear up unclear points with stakeholders, decide on the most appropriate tools and frameworks, find and implement solutions, and describe how it works for clients. In addition, I am a strong team player, I believe that communication is one of the most important parts of the workflow.\n\nI fall into software development accidentally, but it was a happy accident - from start in far 2015 year till now I have never regretted my decision.\n\nStarted as a frontend developer, little by little I moved into the backend - little fix there, little fix th
#!/usr/bin/env bash
set -ex
SERVICE_NAME="resident-cabinet-back"
OLD_NAME="resident-cabinet-back"
NEW_NAME="resident-cabinet-back-new"
DATA_DIR="/var/lib/dokku/services/postgres/$NEW_NAME/data/"
POSTGRES_IMAGE="mdillon/postgis" POSTGRES_IMAGE_VERSION="11" dokku postgres:create $NEW_NAME
package main
import (
"fmt"
"regexp"
)
func main(){
phone := "+1 (567) 222-55-44"
reg := regexp.MustCompile(`\D`)
@Ivan-Feofanov
Ivan-Feofanov / postgres-backup.sh
Created October 30, 2018 08:06
backup postgres db in kubernetes
DB_NAME=$1
NAMESPACE=$@
POD=$(kubectl -n="$NAMESPACE" get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' --selector=app=postgres)
kubectl -n="$NS" exec "$POD" pg_dump -Fc --no-acl --no-owner -h localhost -U postgres -w "$DB_NAME"
@Ivan-Feofanov
Ivan-Feofanov / reload-deployment.sh
Created October 30, 2018 07:55
reload kubernetes deployment
DEPLOYMENT=$1
kubectl patch deployment $DEPLOYMENT -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"`date +'%s'`\"}}}}}"
@Ivan-Feofanov
Ivan-Feofanov / getMethods.js
Last active July 25, 2023 19:24
Get list of association methods of model in Sequelize
const model = %yourSequelizeModel%
for (let assoc of Object.keys(model.associations)) {
for (let accessor of Object.keys(model.associations[assoc].accessors)) {
console.log(model.name + '.' + model.associations[assoc].accessors[accessor]+'()');
}
}