Skip to content

Instantly share code, notes, and snippets.

View AKosmachyov's full-sized avatar
👋

Aliaksandr Kasmachou AKosmachyov

👋
View GitHub Profile
@AKosmachyov
AKosmachyov / index.js
Created January 21, 2023 17:33
NodeJS simple static server
const http = require('http');
const fs = require('fs');
const path = require('path');
const PORT = process.env.PORT || 8125;
http.createServer(function (request, response) {
logRequest(request);
var filePath = '.' + request.url;
if (filePath == './') {
@AKosmachyov
AKosmachyov / readme.md
Last active April 4, 2023 12:35
iOS materials
@AKosmachyov
AKosmachyov / split-iOS-fat-framework.md
Last active March 25, 2022 13:15
Split FAT .framework

The architectures can be shown using lipo -i

$ xcrun lipo -i INSCoreMedia.framework/INSCoreMedia
# Architectures in the fat file: INSCoreMedia.framework/INSCoreMedia are: armv7 i386 x86_64 arm64 
  • arm64 - is the current 64-bit ARM CPU architecture, as used since the iPhone 5S and later (6, 6S, SE and 7), the iPad Air, Air 2 and Pro, with the A7 and later chips.
  • armv7s - being used in Apple's A6 and A6X chips on iPhone 5, iPhone 5C and iPad 4.
  • armv7 - an older variation of the 32-bit ARM CPU, as used in the A5 and earlier.
  • i386 - (i.e. 32-bit Intel) is the only option on iOS 6.1 and below.
@AKosmachyov
AKosmachyov / Plan.md
Created February 10, 2022 10:23
Материалы по обучению iOS разработки
  1. Create file san.cnf
[ req ]
default_bits        = 2048
distinguished_name  = req_distinguished_name
req_extensions      = SAN
extensions          = SAN
[ req_distinguished_name ]
countryName         = BY
stateOrProvinceName = Minsk
@AKosmachyov
AKosmachyov / Player-MVVM-SwiftUI.md
Last active February 10, 2024 18:21
SwiftUI + Combine. Sync Slider & AVPlayer states. MVVM
@AKosmachyov
AKosmachyov / readme.md
Created November 8, 2021 09:30
Ad Hoc Distribution server

Xcode:

  1. Product (on the top menu) -> Archive
  2. Window -> Organizer
  3. Select archive
  4. Distribute App
  5. Developemnt enter app url: https:///apps/.ipa enter dispaly image url: https:///apps/57x57.png enter full size image url: https:///apps/512x512.png
  6. Move Apps folder from the Archive folder to the server.js folder
@AKosmachyov
AKosmachyov / WebRTC.js
Last active April 29, 2021 10:58
WebRTC stats for iOS(swift) & Web(JS)
/*
* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
* https://github.com/webrtc/apprtc/blob/78600dbe205774c115cf481a091387d928c99d6a/src/web_app/js/stats.js#L67
*/
'use strict';
import {
WebGLRenderer,
Scene,
PerspectiveCamera,
Vector3,
LineBasicMaterial,
Clock,
Group,
AnimationMixer,
BufferGeometry,
@AKosmachyov
AKosmachyov / Readme.md
Last active April 29, 2024 22:36
3D notes

3D Function Description

dot - скалярное произведение wiki, Khan Academy

$\vec{a} \cdot \vec{b} = | \vec{a} | | \vec{b} | \cos(\theta)$

Where

  • $| \vec{a} |, | \vec{b} |$ - magnitudes/lengths
  • $\theta$ - is the angle between $\vec{a}$ and $\vec{b}$

Результат dot для 2 нормализированных векторов, отображает их сонаправленность: