Skip to content

Instantly share code, notes, and snippets.

Alejandro Camacho alcamla

Block or report user

Report or block alcamla

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
@alcamla
alcamla / fullScreenSimulator.md
Created Mar 5, 2020
Enable Xcode simulator full screen
View fullScreenSimulator.md

defaults write com.apple.iphonesimulator AllowFullscreenMode -bool YES

View RealmFileLocation.md

po Realm.Configuration.defaultConfiguration.fileURL

View Singleton.swift
final class Singleton {
static let shared = Singleton()
private init() {}
}
@alcamla
alcamla / prettyJSON.swift
Created Dec 10, 2019
Pretty print JSON in swift
View prettyJSON.swift
print(String(data: try! JSONSerialization.data(withJSONObject: dict, options: .prettyPrinted), encoding: .utf8)!)
@alcamla
alcamla / snippet
Created Dec 10, 2019
git merge without a commit
View snippet
git merge v1.0 --no-commit --no-ff
@alcamla
alcamla / AppDelegate.swift
Created May 30, 2018 — forked from jonathan-beebe/AppDelegate.swift
Detect if a Swift iOS app delegate is running unit tests
View AppDelegate.swift
import UIKit
// Detect if the app is running unit tests.
// Note this only detects unit tests, not UI tests.
func isRunningUnitTests() -> Bool {
let env = NSProcessInfo.processInfo().environment
if let injectBundle = env["XCInjectBundle"] {
return NSString(string: injectBundle).pathExtension == "xctest"
}
return false
@alcamla
alcamla / introrx.md
Created Jan 11, 2018 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
View introrx.md
View UIBezierPath+forEachElement.h
#import <UIKit/UIKit.h>
@interface UIBezierPath (forEachElement)
- (void)forEachElement:(void (^)(CGPathElement const *element))block;
@end
You can’t perform that action at this time.