Skip to content

Instantly share code, notes, and snippets.

@genadyp
genadyp / vim.md
Last active January 29, 2024 06:46
vim

Motions

vim-wordmotion - More useful word motions for Vim

IDE

NvChad - An attempt to make neovim cli functional like an IDE while being very beautiful, blazing fast startuptime ~ 0.06 secs

LazyVim - Neovim config for the lazy

version: "3"
services:
# configuration manager for NiFi
zookeeper:
hostname: myzookeeper
container_name: zookeeper_container_persistent
image: 'bitnami/zookeeper:3.7.0' # latest image as of 2021-11-09.
restart: on-failure
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
@genadyp
genadyp / example.py
Created December 8, 2021 11:08 — forked from schlamar/example.py
mplog: Python advanced multiprocessing logging.
import logging
import multiprocessing
import time
import mplog
FORMAT = '%(asctime)s - %(processName)s - %(levelname)s - %(message)s'
logging.basicConfig(level=logging.DEBUG, format=FORMAT)
existing_logger = logging.getLogger('x')

End-to-end vs integration tests: what's the difference?

Posted by Brian Borg on Nov 19 2020

The terms 'end-to-end' and 'integration testing' seem to have a lot of people in the software testing world conflicted. We've trawled the internet and found many different opinions, so we thought we'd compare the two, provide some context and create a definitive guide.

What is end-to-end testing?

End-to-end testing verifies that your software works correctly from the beginning to the end of a particular user flow. It replicates expected user behavior and various usage scenarios to ensure that your software works as whole.

@genadyp
genadyp / ultimate-ut-cheat-sheet.md
Created November 24, 2021 06:35 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@genadyp
genadyp / jinja_json.json
Last active November 1, 2021 12:04 — forked from sevennineteen/example.json
Example using Jinja2 to populate a JSON payload template
{ "path": "/content/geometrixx/my-first-jinja-page",
"properties": [
{ "name": "jcr:primaryType",
"value": "cq:Page" }],
"nodes": [
{ "path": "jcr:content",
"properties": [
{ "name": "jcr:primaryType",
"value": "cq:PageContent"},
@genadyp
genadyp / app.js
Created October 21, 2021 15:31 — forked from joshnuss/app.js
Express.js role-based permissions middleware
// the main app file
import express from "express";
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db)
import authenticate from "./authentication"; // middleware for doing authentication
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request
const app = express(),
api = express.Router();
// first middleware will setup db connection
@genadyp
genadyp / pytest.md
Last active June 29, 2021 12:27
pytest

How to share global variables between tests?

Option 1

# contents of conftest.py

import pytest
@genadyp
genadyp / setup.cfg
Created June 29, 2021 10:24
setup.cfg
# https://github.com/pypa/build/blob/main/setup.cfg
[metadata]
name = build
version = 0.5.1
description = A simple, correct PEP517 package builder
long_description = file: README.md
long_description_content_type = text/markdown
author = Filipe Laíns
author_email = lains@riseup.net
@genadyp
genadyp / .editorconfig
Created June 14, 2021 04:18
editorconfig
# see https://editorconfig.org/
root = true
[*]
# Use Unix-style newlines for most files (except Windows files, see below).
end_of_line = lf
trim_trailing_whitespace = true
indent_style = space
insert_final_newline = true
indent_size = 4