Skip to content

Instantly share code, notes, and snippets.

View Andrey-Kovinjonok's full-sized avatar

Andrey Kovinjonok Andrey-Kovinjonok

View GitHub Profile
https://github.com/serhack/pdf-diff
https://github.com/t9tio/open-source-jobs
https://github.com/wmnnd/nginx-certbot
https://github.com/n8n-io/n8n
https://github.com/casterbyte/F31
@Andrey-Kovinjonok
Andrey-Kovinjonok / ConstString.hxx
Created April 10, 2024 12:43 — forked from Redchards/ConstString.hxx
Simple constexpr assert hack.
#ifndef CONST_STRING_HXX
#define CONST_STRING_HXX
#include <algorithm>
#include <cstddef>
#include <stdexcept>
#include <gsl_assert.h>
#include <ArrayIteratorPolicy.hxx>
@Andrey-Kovinjonok
Andrey-Kovinjonok / ConstString.hxx
Created April 10, 2024 12:43 — forked from Redchards/ConstString.hxx
Simple constexpr assert hack.
#ifndef CONST_STRING_HXX
#define CONST_STRING_HXX
#include <algorithm>
#include <cstddef>
#include <stdexcept>
#include <gsl_assert.h>
#include <ArrayIteratorPolicy.hxx>
@Andrey-Kovinjonok
Andrey-Kovinjonok / keychron_linux.md
Created August 13, 2023 19:40 — forked from andrebrait/keychron_linux.md
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work

Keychron Keyboards on Linux use the hid_apple driver (even in Windows/Android mode), both in Bluetooth and Wired modes. By default, this driver uses the F-keys as multimedia shortcuts and you have to press Fn + the key to get the usual F1 through F12 keys.

Using Python w/ Minecraft on Ubuntu

These instructions should work on any Ubuntu-based OS, but have only been tested on GalliumOS.

Install required packages

Copy and paste the following line into a terminal and press enter to install all the dependencies (you might already have some installed):

sudo apt update
sudo apt install python-software-properties python3 python3-pip idle3 git
sudo apt install openjdk-8-jre-headless openjdk-8-jdk maven
@Andrey-Kovinjonok
Andrey-Kovinjonok / what-forces-layout.md
Created January 5, 2023 01:00 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
# git clone https://github.com/NVlabs/stylegan2
import os
import numpy as np
from scipy.interpolate import interp1d
from scipy.io import wavfile
import matplotlib.pyplot as plt
import PIL.Image
import moviepy.editor
import dnnlib
@Andrey-Kovinjonok
Andrey-Kovinjonok / basic_motion_detection_opencv_python.py
Created January 20, 2020 02:00 — forked from pknowledge/basic_motion_detection_opencv_python.py
Motion Detection and Tracking Using Opencv Contours
import cv2
import numpy as np
cap = cv2.VideoCapture('vtest.avi')
frame_width = int( cap.get(cv2.CAP_PROP_FRAME_WIDTH))
frame_height =int( cap.get( cv2.CAP_PROP_FRAME_HEIGHT))
fourcc = cv2.VideoWriter_fourcc('X','V','I','D')
@Andrey-Kovinjonok
Andrey-Kovinjonok / README.md
Created July 19, 2019 18:24 — forked from yang-wei/README.md
ES6 destructing (and rest parameter)

We will first discussed how destructing and rest parameters can be used in ES6 - in arrays and objects. Then we will look at a few examples and also discuss some quiz.

arrays

var array = [1, 2, 3, 4];
var nestedArray = [1, 2, 3, 4, [7, 8, 9]];

var [a, b, c, d] = array;
console.log(a, b, c, d)
@Andrey-Kovinjonok
Andrey-Kovinjonok / functional_unwrap.hpp
Created November 13, 2018 08:55 — forked from Naios/functional_unwrap.hpp
C++ functional argument unwrap traits. Extracts argument and return types of functions, std:.function and std::tuple's
/*
* Copyright (C) 2015 Naios <naios-dev@live.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,