Skip to content

Instantly share code, notes, and snippets.

Oscar Swanros OscarSwanros

Block or report user

Report or block OscarSwanros

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View multipart_form_upload.swift
//
// UploadFileToS3Operation.swift
// VecinioAPIKit
//
// Created by Oscar Swanros on 9/2/17.
// Copyright © 2017 Vecinio Technologies Inc. All rights reserved.
//
final public class UploadFileToS3Operation: P3Operation {
public let image: UIImage
View BackgroundedLabel.swift
//
// ViewController.swift
// Test
//
// Created by Oscar Swanros on 3/3/17.
// Copyright © 2017 Pacific3. All rights reserved.
//
import UIKit
@OscarSwanros
OscarSwanros / main.swift
Last active Jan 3, 2017
Execute on main thread
View main.swift
public func p3_executeOnMainThread(handler: (Void) -> Void) {
if Thread.isMainThread {
handler()
} else {
DispatchQueue.main.sync(execute: handler)
}
}
func main() {
p3_executeOnMainThread {
View gist:5f60dc845c6ffb970bf16f3ecb7fded4
ssh-keygen -t rsa -b 4096 -C "nancy@pacific3.net" # Genera una llave con tu correo. Te va a pedir una ubicacion, luego un
# passhphrase y una confirmacion del passphrase. Deja todo en blanco.
eval "$(ssh-agent -s)" # Activa el servidor SSH. Te debe salir algo como: Agent pid 35677
ssh-add ~/.ssh/id_rsa # agrega la llave que acabas de generar a la lista de llaves permitidas
pbcopy < ~/.ssh/id_rsa.pub # copia la llave al portapapeles
View active.swift
class MyController: UIViewController {
static var activeInstances: Int = 0
init() {
super.init()
MyController.activeInstances += 1
}
dealloc {
View xcode.log
=== BUILD TARGET P3UIKit OF PROJECT P3UIKit WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
=== BUILD TARGET CallicoKit OF PROJECT Callico WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
Write auxiliary files
write-file /Users/Swanros/Documents/Pacific3/callico-ios/build/Callico.build/Release-iphoneos/CallicoKit.build/CallicoKit-all-non-framework-target-headers.hmap
View .gitignore
build/
DerivedData
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
View gist:f68c80efe405e990b2e9
Copperplate-Light
Copperplate
Copperplate-Bold
IowanOldStyle-Italic
IowanOldStyle-Roman
IowanOldStyle-BoldItalic
IowanOldStyle-Bold
KohinoorTelugu-Regular
KohinoorTelugu-Medium
KohinoorTelugu-Light
@OscarSwanros
OscarSwanros / copyable.swift
Last active Jan 22, 2016
Custom Copyable
View copyable.swift
import Foundation
protocol Copyable {
typealias C
init()
func _copy() -> C
}
class CopyBox<T: Copyable> {
@OscarSwanros
OscarSwanros / .gitignore
Created Jan 15, 2016
Xcode Swift Gitignore
View .gitignore
build/
DerivedData
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
You can’t perform that action at this time.