Skip to content

Instantly share code, notes, and snippets.

View aratkevich's full-sized avatar
👋

ratkevich aratkevich

👋
View GitHub Profile

An guide how to activate Windows 11 Pro for free

Why?

Because you will get some more features like an Bitlocker and host your device as an External Desktop which can be accessed through the internet

Am i also able to switch from any other edition to Pro?

The answer is yes! You can switch from almost any edition to Pro completely for free!

Note for users with unactivated Pro edition

People which already have Pro, but not activated, can skip to this step.

Getting started

What you first need to do is open CMD (Command Prompt) as Administrator using this keyboard key:

@Ash-Bash
Ash-Bash / BlurredHostingController.swift
Created April 7, 2020 14:21
Creates a UIViewController with Blurred Background Which acts like a UIHostingController for SwiftUI Views (Useful for UIKit developers using SwiftUI Views for Modal Views)
//
// BluredBackgroundHostingController.swift
// v1.0.1
//
// Created by Ashley Chapman on 07/04/2020.
// Copyright © 2020 Ashley Chapman. All rights reserved.
//
import UIKit
@NeilsUltimateLab
NeilsUltimateLab / Understanding UIViewController Rotation when embed in Container View Controllers.md
Last active November 7, 2023 11:59
Understanding UIViewController rotation when embed in Container View Controllers.

Understanding UIViewController Rotation

Problem

To enable the rotation of a single view controller used to display the preview of Images/Videos. It is intuitive to allow user to rotate there device and screen changes accordingly, so it feels pleasant. But to achieve this, we need to enable the (almost) all Supported Device orientations.

Ex: `Portrait`, `LandscapeLeft`, `LandscapeRight`.
@rodydavis
rodydavis / AutoIncrementBuilds.sh
Last active September 15, 2018 08:34
Auto Increment Build and Version Numbers
#Works with Xcode 9 (Confirmed)
#1. Go to "Edit Schemes"
#2. Go to "Build"
#3. Go to "Pre-Actions"
#4. Select YOUR app in "Provide Build Settings from:"
#5. Paste Below Script in Box
#6. Build Project
#Build Number ++
@BohdanOrlov
BohdanOrlov / ViewControllerLifecycleBehavior.swift
Created October 23, 2017 09:36
Swift implementation of idea that manny view controller can do light work: http://khanlou.com/2016/02/many-controllers/
public protocol ViewControllerLifecycleBehavior {
func afterLoading(_ viewController: UIViewController)
func beforeAppearing(_ viewController: UIViewController)
func afterAppearing(_ viewController: UIViewController)
func beforeDisappearing(_ viewController: UIViewController)
func afterDisappearing(_ viewController: UIViewController)
@nahuelDeveloper
nahuelDeveloper / CalculatorView.swift
Created October 4, 2017 12:49 — forked from natecook1000/CalculatorView.swift
An IBInspectable Calculator Construction Set
// CalculatorView.swift
// as seen in http://nshipster.com/ibinspectable-ibdesignable/
//
// (c) 2015 Nate Cook, licensed under the MIT license
import UIKit
/// The alignment for drawing an String inside a bounding rectangle.
enum NCStringAlignment {
case LeftTop
@hgsan
hgsan / ScrollViewAndPageControlViewContoller.swift
Last active May 16, 2019 05:29
manage UIPageControl and UIScrollView with RxSwift
@IBOutlet weak var pageControll: UIPageControl!
@IBOutlet weak var scrollView: UIScrollView!
var scrollViewPageIndex :Int {
set {
let contentX = scrollView.width * CGFloat(newValue)
DispatchQueue.main.async {
UIView.animate(withDuration: 0.2, animations: { [weak self] _ in
self?.scrollView.contentOffset = CGPoint.init(x: contentX, y: 0)
})
@bleft
bleft / Data+Extension.swift
Created December 14, 2016 13:19
get md5 hash from Data in swift
extension Data {
var md5 : String {
var digest = [UInt8](repeating: 0, count: Int(CC_MD5_DIGEST_LENGTH))
_ = self.withUnsafeBytes { bytes in
CC_MD5(bytes, CC_LONG(self.count), &digest)
}
var digestHex = ""
for index in 0..<Int(CC_MD5_DIGEST_LENGTH) {
digestHex += String(format: "%02x", digest[index])
}
@Nirma
Nirma / FTPUpload.swift
Last active December 30, 2023 02:11
Upload a file via FTP on iOS or macOS
import Foundation
import CFNetwork
public class FTPUpload {
fileprivate let ftpBaseUrl: String
fileprivate let directoryPath: String
fileprivate let username: String
fileprivate let password: String