Skip to content

Instantly share code, notes, and snippets.

Marius Hartig mariushartig

  • Munich
Block or report user

Report or block mariushartig

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 keybase.md

Keybase proof

I hereby claim:

  • I am mariushartig on github.
  • I am mrmarix (https://keybase.io/mrmarix) on keybase.
  • I have a public key ASDmw8mhAHAInOe5VPue2om7SJxXaXVv51U-NI1AA8RhXwo

To claim this, I am signing this object:

View gist:d311c66a4c8566154fbfd8308e02eda7
open -a /Applications/Syntra\ Small.app $1
@mariushartig
mariushartig / beginupdateds.swift
Created Oct 26, 2017
UITableView begin Updates with Completion Block
View beginupdateds.swift
CATransaction.begin()
CATransaction.setCompletionBlock({
do.something()
})
tableView.beginUpdates()
tableView.endUpdates()
CATransaction.commit()
@mariushartig
mariushartig / locations.gpx
Created Oct 18, 2017
Xcode add GPX File for simulate Locations
View locations.gpx
<?xml version="1.0"?>
<gpx version="1.1" creator="Xcode">
<wpt lat="37.783879" lon="-122.4012538">
<name>Moscone</name>
</wpt>
<wpt lat="37.331705" lon="-122.030237">
<name>Cupertino</name>
</wpt>
</gpx>
@mariushartig
mariushartig / Double+Extensions.swift
Last active Oct 26, 2017
Double String with Fraction Digits
View Double+Extensions.swift
extension Double {
func string(fractionDigits:Int) -> String? {
let formatter = NumberFormatter()
formatter.minimumFractionDigits = fractionDigits
formatter.maximumFractionDigits = fractionDigits
formatter.numberStyle = .decimal
return formatter.string(from: NSNumber(value: self))
}
}
@mariushartig
mariushartig / CoreDataManager.swift
Last active Nov 8, 2017
Swift Simple Core Data Manager
View CoreDataManager.swift
//
// CoreDataManager.swift
// AppDemo
//
// Created by Marius Hartig on 08/02/2017.
// Copyright © 2017 Marius Hartig. All rights reserved.
//
import Foundation
import CoreData
@mariushartig
mariushartig / objective-c.m
Created Oct 5, 2017
iOS Version Check Xcode
View objective-c.m
if (@available(iOS 11, *))
View xcode-switch.txt
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
View oop.swift
// OOP
class Food {
let name: String
init(name: String) {
self.name = name
}
View ResignCurrentFirstResponder.swift
UIApplication.shared.sendAction(#selector(resignFirstResponder), to: nil, from: nil, for: nil)
You can’t perform that action at this time.