Skip to content

Instantly share code, notes, and snippets.

View OscarSwanros's full-sized avatar

Oscar Swanros OscarSwanros

View GitHub Profile
@OscarSwanros
OscarSwanros / subarray
Last active December 30, 2015 20:59
Get the maximum sum (subarray) from an array
#import "MSViewController.h"
@interface MSViewController ()
@end
@implementation MSViewController
- (void)viewDidLoad
{
@OscarSwanros
OscarSwanros / data.json
Created July 17, 2014 20:30
Mock Server JSON Response
{
clients: [
{
id: 1,
name: "Oscar Swanros",
email: "mail@example.com",
company: "Pacific3",
event_number: 0,
created_at: "2014-07-16T15:35:14.646Z"
},

Keybase proof

I hereby claim:

  • I am oscarswanros on github.
  • I am oscarswanros (https://keybase.io/oscarswanros) on keybase.
  • I have a public key whose fingerprint is 3504 D906 E378 8983 75AC 5460 DDA8 DC67 88C2 F805

To claim this, I am signing this object:

http://cl.ly/1Z2R1n3B320V
@OscarSwanros
OscarSwanros / .gitignore
Created January 15, 2016 04:03
Xcode Swift Gitignore
build/
DerivedData
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
@OscarSwanros
OscarSwanros / copyable.swift
Last active January 22, 2016 20:10
Custom Copyable
import Foundation
protocol Copyable {
typealias C
init()
func _copy() -> C
}
class CopyBox<T: Copyable> {
Copperplate-Light
Copperplate
Copperplate-Bold
IowanOldStyle-Italic
IowanOldStyle-Roman
IowanOldStyle-BoldItalic
IowanOldStyle-Bold
KohinoorTelugu-Regular
KohinoorTelugu-Medium
KohinoorTelugu-Light
@OscarSwanros
OscarSwanros / .gitignore
Created August 9, 2016 16:04
.gitignore xcode
build/
DerivedData
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
=== 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
class MyController: UIViewController {
static var activeInstances: Int = 0
init() {
super.init()
MyController.activeInstances += 1
}
dealloc {