Skip to content

Instantly share code, notes, and snippets.

View miralem-cebic's full-sized avatar
🚀

Miralem Cebic miralem-cebic

🚀
  • DE-CIX
  • Frankfurt am Main, Germany
View GitHub Profile
@nacho4d
nacho4d / Daemon in OSX Example
Created April 8, 2012 17:06
Daemon in OSX Example
#import <Foundation/Foundation.h>
#import <CoreFoundation/CoreFoundation.h>
# pragma mark Daemon Protocol
@protocol DaemonProtocol
- (void)performWork;
@end
# pragma mark MyTask Object Conforms to Protocol
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
@felix-schwarz
felix-schwarz / SignAndPackageForMAS.sh
Last active August 16, 2024 05:27
Codesign an app bundle and build a signed package ready for submission to the Mac App Store
#!/bin/bash
#
# SignAndPackageForMAS.sh v1.0.1
#
# Codesign an app bundle and build a signed package ready for submission to the
# Mac App Store
#
# Copyright (c) 2014 Felix Schwarz (@felix_schwarz), IOSPIRIT GmbH (@iospirit)
#

Git Cheat Sheet

Commands

Getting Started

git init

or

Swift Don'ts

  • Don't add code cruft. Avoid parentheses around conditions in if-statements or with the return keyword. Don't add semicolons except where syntactically demanded in statements or to separate statements on the same line.
  • Don't use ALL_CAPS; use camelCase
  • Don't fight type inference. Use enumeration prefixes, self-references, and class names (with constructors) only when necessary or to clarify coding intent.
  • Don't use var when let is appropriate, especially for properties. The compiler better optimizes let statements for items whose values will not change during their lifetime. For example, Apple writes, "It is good practice to create immutable collections in all cases where the collection does not need to change. Doing so enables the Swift compiler to optimize the performance of the collections you create."
  • Don't use classes when structs will do. Use class