Skip to content

Instantly share code, notes, and snippets.

View iharkatkavets's full-sized avatar
💻
Code is like humor. When you have to explain it, it's bad

Ihar Katkavets iharkatkavets

💻
Code is like humor. When you have to explain it, it's bad
View GitHub Profile
@iharkatkavets
iharkatkavets / install_swift_on_raspberrypi.md
Created September 23, 2023 08:07
Install `swift` on Raspberry Pi

All next stepts are performed in Raspberry Pi environment

  1. Create a temporary directory
cd ~ && mkdir swift5.9 && cd !$
  1. Download the latest Swift version for ARM architecture(aarch64). On the moment of preparing the manual the latest version is 5.9
wget https://download.swift.org/swift-5.9-branch/ubuntu2004-aarch64/swift-5.9-DEVELOPMENT-SNAPSHOT-2023-09-21-a/swift-5.9-DEVELOPMENT-SNAPSHOT-2023-09-21-a-ubuntu20.04-aarch64.tar.gz
  1. Extract the acrhive
@iharkatkavets
iharkatkavets / neovim_on_raspberrypi.md
Last active September 23, 2023 07:04
Install `neovim` on Raspberry Pi

All the next steps are performed on RaspberryPi machine in console

  1. Download the latest version of neovim from official repository. At the moment of writing the manual the latest version is 0.9.2
cd ~ && mkdir neovim-install && cd !$
wget 'https://github.com/neovim/neovim/archive/refs/tags/v0.9.2.tar.gz'
  1. Extract the downloaded archive and navigate inside
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdbool.h>
#include <strings.h>
char* readline() {
size_t alloc_length = 1024;
size_t data_length = 0;
@iharkatkavets
iharkatkavets / readme.md
Created October 26, 2020 21:58 — forked from lgg/readme.md
Keepass file format explained

Keepass file format explained

I’m currently working (I’m just at the beginning, and I’m quite slow) on a personal project that will use Keepass files (kdb and kdbx).
I tried to find some documentation about .kdb and .kdbx format, but I didn’t find anything, even in the Keepass official website. I you want to know how these file formats are structured, you must read Keepass’s source code. So I wrote this article that explains how Keepass file format are structured, maybe it will help someone.

@iharkatkavets
iharkatkavets / gist:7d632e87b3af27a4952561122398a8d1
Created October 24, 2020 12:29 — forked from msmuenchen/gist:9318327
KeePass v2.x (KDBX v3.x) file format
Convention: Byte array notation as it would appear in a hexeditor.
= Layout=
KDBX files, the keepass database files, are layout as follows:
1) Bytes 0-3: Primary identifier, common across all kdbx versions:
private static $sigByte1=[0x03,0xD9,0xA2,0x9A];
2) Bytes 4-7: Secondary identifier. Byte 4 can be used to identify the file version (0x67 is latest, 0x66 is the KeePass 2 pre-release format and 0x55 is KeePass 1)
import UIKit
import Swinject
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
let diResolver = {
Assembler([CoreAssembly(),
MainAssembly(),
PasswordAssembly(),
FilesListAssembly()]).resolver
@iharkatkavets
iharkatkavets / dlsym_upload.sh
Last active December 4, 2018 17:47
Xcode. Build-Scripts
#!/bin/bash
echo "API KEY ${FABRIC_API_KEY}"
echo "Look for dSym files at ${BUILT_PRODUCTS_DIR}..."
FILES=($(find "${BUILT_PRODUCTS_DIR}" -iname '*.dSym' 2>/dev/null))
for file in "${FILES[@]}"; do
"${PODS_ROOT}/Fabric/upload-symbols" -d -a "${FABRIC_API_KEY}" -p ios "${file}"
done
XXAwesomeInteractor, XXAwesomeManager, XXAwesomeComputations, XXAwesomeLoader, XXISOCodesDecoder, XXTimeIntervalFormatter, XXVODInfoMapper
// take a frame at specified time
$ ffmpeg -ss 00:02:04.400 -i 03241225_0031.MP4 -vframes 1 -q:v 2 ~/Desktop/output1.jpg
# OS X
.DS_Store
# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3