Skip to content

Instantly share code, notes, and snippets.

View alexey1312's full-sized avatar
๐ŸŽฏ
Focusing

Aleksei Kakoulin alexey1312

๐ŸŽฏ
Focusing
View GitHub Profile
@alexey1312
alexey1312 / 0-go-os-arch.md
Created January 9, 2024 15:41 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix โœ…
android โœ…
@alexey1312
alexey1312 / update-golang.md
Created January 9, 2024 14:01 — forked from nikhita/update-golang.md
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

1. <!DOCTYPE>: Defines the document type and version of HTML.
2. <a>: Defines a hyperlink.
3. <abbr>: Represents an abbreviation or acronym.
4. <address>: Defines contact information for the author/owner of a document or an article.
5. <area>: Defines a hot-spot region in an image-map.
6. <article>: Defines an article.
7. <aside>: Defines content aside from the page content.
8. <audio>: Defines sound or music content.
9. <b>: Defines bold text.
10. <base>: Specifies the base URL/target for all relative URLs in a document.
@alexey1312
alexey1312 / meta-tags.md
Created October 16, 2023 16:49 — forked from whitingx/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
import notify
import Combine
enum Notify {}
extension Notify {
struct Status: Error {
let rawValue: UInt32
init(_ rawValue: UInt32) {
self.rawValue = rawValue
@alexey1312
alexey1312 / RemovableKeyboardShortcut.swift
Created March 28, 2023 18:43 — forked from Clarko/RemovableKeyboardShortcut.swift
SwiftUI suppressible keyboard shortcuts
//
// RemovableKeyboardShortcut.swift
//
// Created by Clarko on 2/2/21.
//
// Adds an argument to dynamically remove a keyboard shortcut
//
import SwiftUI
@alexey1312
alexey1312 / RelativeSizeLayout.swift
Created March 27, 2023 17:11 — forked from ole/RelativeSizeLayout.swift
A SwiftUI layout and modifier for working with relative sizes ("50โ€ฏ% of your container"). https://oleb.net/2023/swiftui-relative-size/
import SwiftUI
extension View {
/// Proposes a percentage of its received proposed size to `self`.
///
/// This modifier multiplies the proposed size it receives from its parent
/// with the given factors for width and height.
///
/// If the parent proposes `nil` or `.infinity` to us in any dimension,
/// weโ€™ll forward these values to our child view unchanged.
@alexey1312
alexey1312 / ioslocaleidentifiers.csv
Created March 12, 2023 16:52 — forked from jacobbubu/ioslocaleidentifiers.csv
iOS Locale Identifiers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)

How to Download iOS Simulator (Xcode) in Command Line and Install it

For faster connection speed and more flexibility.

Steps

  1. Start Xcode in command line by running this in commandline /Applications/Xcode.app/Contents/MacOS/Xcode
  2. Start downloading of the simulator
  3. Cancel it. YES CANCEL IT!
  4. You will get a message like this:
@alexey1312
alexey1312 / Obj-C
Created August 7, 2020 14:58
Request to use microphone + go to application settings if access was not allowed earlier
- (void) checkMicrophoneAccess {
switch ([[AVAudioSession sharedInstance] recordPermission]) {
case AVAudioSessionRecordPermissionGranted:
[self addAudioFromMicrophone];
NSLog(@"๐Ÿ“น Mic enabled ๐Ÿ‘");
break;
case AVAudioSessionRecordPermissionDenied:
NSLog(@"๐Ÿ“น Mic does not have permission ๐Ÿ‘Ž");
[self presentMicrophoneSettings];
break;