Skip to content

Instantly share code, notes, and snippets.

View rafaelclaycon's full-sized avatar

Rafael Schmitt rafaelclaycon

  • Poatek, a TELUS International Company
  • Rio Grande do Sul, Brasil
  • 00:15 (UTC -03:00)
  • Mastodon @mitt_rafael@toot.wales
View GitHub Profile
@Jswizzy
Jswizzy / InstallingSwift.md
Last active May 26, 2024 00:41
Swift Install Instruction 20.04

Installing Swift on Ubuntu 20.04

1. Install Depencies

“clang”[ˈklæŋ] is the compiler based on LLVM for C, C++, Objective-C, and Objective-C++. clang is needed to install in order to Swift. Run the following code in Ubuntu terminal.

Before installing swift “libpython2.7” and “libpython2.7-dev” are needed to get Swift running. Run the following code.

@brunow
brunow / ContentView.swift
Created August 26, 2020 15:43
Donate a NSUserActivity and restore it with SwiftUI
import SwiftUI
struct UserActivityView: View {
@State private(set) var activityType: String? = nil
@State private(set) var currentActivity: NSUserActivity? = nil
var body: some View {
Text(activityType ?? "No activity restored yet")
.onContinueUserActivity("userActivity", perform: { userActivity in
self.activityType = userActivity.activityType
@podkovyrin
podkovyrin / UIImage+RoundedCorners.swift
Last active November 3, 2023 17:19
Swift 5 UIImage extension to round corners using UIGraphicsImageRendererFormat to render
//
// Created by Andrew Podkovyrin
// Copyright © 2020 Andrew Podkovyrin. All rights reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active July 22, 2024 12:48
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S