Skip to content

Instantly share code, notes, and snippets.

View deissh's full-sized avatar
👨‍💻
Trying 10k hours

Kirill deissh

👨‍💻
Trying 10k hours
View GitHub Profile
@deissh
deissh / gen.py
Last active November 30, 2022 10:46
MSFS Helipad autogen
from typing import Optional
import requests
import xml.etree.ElementTree as ET
from pprint import pprint
from dataclasses import dataclass, asdict, fields, is_dataclass
class Exportable:
1)
m := map[string]int{"a":1,"b":2,"c":3}
for k, v := range m {
fmt.Println(k, v)
}
2)
x := make(map[int]int, 1)
var mx sync.Mutex
@deissh
deissh / position streaming
Last active March 5, 2022 08:54
protocol reverse
----
# Packet 2478 from C:\Users\keelv\Downloads\WiresharkPortable64\Data\Temp\wireshark_NPF_Loopback5740I1.pcapng
- 2479
- 87.264090
- 127.0.0.1
- 127.0.0.1
- TCP
- 127
- 4827 → 63980 [PSH, ACK] Seq=74361 Ack=15 Win=8441 Len=83
@deissh
deissh / main.cpp
Last active November 9, 2021 12:27
// для сборки с помощью cmake нужно
//
// CMAKE_CXX_FLAGS="/DWIN32 /D_WINDOWS /W3 /GR /EHsc /D_UNICODE /DUNICODE /c"
// и add_executable (os-labs-2 WIN32 "main.cpp")
#include <windows.h>
#include <stdlib.h>
#include <string.h>
#include <tchar.h>
#include <dbt.h>
// os-labs.cpp
//
#include <iostream>
#include <iomanip>
#include <windows.h>
#include <algorithm>
#include <stdio.h>
/// example
/// Singleton<Effects>.Instance.SomeAction();
public class Singleton<T> where T : class {
private static T _instance;
public static bool Instantiated
{
get
{
@deissh
deissh / cloud_formation.yaml
Created April 26, 2021 15:21
AWS CloudFront with Cognito authentication
Description: >
CloudFront with Cognito authentication
Parameters:
CookieCompatibility:
Default: amplify
Type: String
Description: >-
Specify whether naming of cookies should be compatible with AWS Amplify
(default) or Amazon Elasticsearch Service. In case of the latter, turn off
SPA mode too: set parameter EnableSPAMode to false
syntax on
set nocompatible
set number
set relativenumber
set notimeout
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
@deissh
deissh / ozon_e_2_chans_main_test.go
Created June 11, 2020 13:59
OZON Yandex.Context E test
package main
import (
"fmt"
"testing"
"time"
)
func slowSquare(a int) int {
time.Sleep(50 * time.Millisecond)
@deissh
deissh / indexedDB.js
Created June 8, 2020 20:42
indexedDB search by regex
const request = window.indexedDB.open('_pouch_my_database', 5);
const rg = new RegExp("eius");
request.onsuccess = () => {
const db = request.result;
const transaction = db.transaction(['by-sequence'], 'readonly');
const invoiceStore = transaction.objectStore('by-sequence');
const getCursorRequest = invoiceStore.openCursor();
getCursorRequest.onsuccess = e => {
const cursor = e.target.result;
if (cursor) {