Skip to content

Instantly share code, notes, and snippets.

View rychkog's full-sized avatar

Georgii Rychko rychkog

  • Ukraine, Kharkiv
View GitHub Profile
@rychkog
rychkog / mysqldump-remote-database-with-local-docker-image.md
Created November 17, 2022 17:32
Run mysqldump on remote database using local docker image

When no mysql tools are available locally, use mysqldump from inside a docker container to backup a remote database.

docker run -it --rm -e MYSQL_PWD=<user pass> mysql:5.7 mysqldump -u <user> -h <ip address> -P 3306 database 1> backup.sql

@rychkog
rychkog / work-journal.md
Last active December 2, 2021 14:28
Gentrack

Work Journal

Dec 1, 2021

  • IN PROGRESS

    • Onboarding courses/videos
    • Reading Confluence
  • INTERESTING:

@rychkog
rychkog / code-snippets.md
Last active November 22, 2021 16:48
Work activities

Code Snippets

Delete sqs messages in batches

  async deleteBatch(
    messages: { receiptHandle: string; eventSourceARN: string }[],
  ): Promise<DeleteMessageBatchResult> {
    if (!messages.length) {
@rychkog
rychkog / aws-lambda-relative-import-no-known-parent-package.md
Created December 4, 2020 12:14 — forked from gene1wood/aws-lambda-relative-import-no-known-parent-package.md
Python relative imports in AWS Lambda fail with `attempted relative import with no known parent package`

Python relative imports in AWS Lambda fail with attempted relative import with no known parent package

The Problem

In AWS Lambda if I attempt an explicit relative import like this

.
├── lambda_file.py
└── example.py
@rychkog
rychkog / instructions.md
Created November 7, 2020 10:28 — forked from matthewjberger/instructions.md
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

Setup a development env for the developers

Once this is merged every developer that has his own env should do the following:

  1. Populate some extra env vars in .env:
RAILSBANK_API_KEY_ARN={Here you need to put an ARN of Railsbank secret in AWS Secrets Manager}
REMAGINE_DATA_STACK_NAME=DataStack
REMAGINE_SERVERLESS_STACK_NAME=ServerlessStack
@rychkog
rychkog / local.conf
Last active October 5, 2020 08:11
fonts-config
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit name="hinting" mode="assign">
<bool>true</bool>
</edit>
<edit mode="assign" name="hintstyle">
<const>hintslight</const>
</edit>
@rychkog
rychkog / cdk-vpc.ts
Created September 24, 2020 15:25
cdk-vpc.ts
// CDK
import * as core from '@aws-cdk/core';
import * as apigateway from '@aws-cdk/aws-apigateway';
import * as lambda from '@aws-cdk/aws-lambda';
import * as ec2 from '@aws-cdk/aws-ec2';
export class DataConnectorStack extends core.Stack {
constructor(scope: core.Construct, id: string, props?: core.StackProps) {
super(scope, id, props);
@rychkog
rychkog / redis-cli-in-docker.sh
Created June 9, 2020 17:20 — forked from xynova/redis-cli-in-docker.sh
Start redis-cli-in-docker
docker run --rm -ti --name rediscli \
--net host \
redis:alpine \
redis-cli -h localhost -p 6379 -a THE-XXXX-PASSWORD ping
@rychkog
rychkog / bitbucket-pipelines.yml
Created March 28, 2020 13:51 — forked from jincod/bitbucket-pipelines.yml
Docker deployment using Bitbucket Pipelines and Heroku
pipelines:
default:
- step:
name: build and publish docker image
services:
- docker
caches:
- docker
script:
- docker build -t $APP_NAME .