Skip to content

Instantly share code, notes, and snippets.

View KoCMoHaBTa's full-sized avatar
🚀
🌔

Milen Halachev KoCMoHaBTa

🚀
🌔
  • Plovdiv, Bulgaria
View GitHub Profile
@KoCMoHaBTa
KoCMoHaBTa / XCTestExtensions.swift
Last active January 11, 2019 17:50
Useful Extensions to XCTest framework
//
// XCTestExtensions.swift
// https://gist.github.com/KoCMoHaBTa/4ba07984d7c95822bc05
//
// Created by Milen Halachev on 3/18/16.
// Copyright © 2016 Milen Halachev. All rights reserved.
//
import Foundation
import XCTest
#!/usr/bin/swift
import Foundation
import Cocoa
extension String: ErrorType {}
extension NSImage {
public func writeToURL(url: NSURL, size: NSSize) throws {
#!/usr/bin/swift
import Foundation
let Usage = "Usage: PrefixFiles.swift <directory> <prefix>"
extension String: ErrorType {}
extension NSURL {
#!/bin/bash
git submodule update --init --recursive --remote --merge
@KoCMoHaBTa
KoCMoHaBTa / Carthage Integration.md
Last active July 19, 2018 15:52
Carthage Integration
@KoCMoHaBTa
KoCMoHaBTa / - UITesting Utilities.md
Last active July 13, 2022 00:22
UITesting Utilities

UITesing Utilities

Contents

How to use

  • add the contents to your UITesting target
  • import XCTest-Private.h into your UITesting target bridging header
  • in your XCTestCase tearDown() method use the Springboard utility to delete the app and/or reset Location and Privacy Settings
@KoCMoHaBTa
KoCMoHaBTa / slackmojis.yaml
Created June 23, 2017 13:26
KoCMoHaBTa's slackmojis
title: slackmojis
emojis:
- name: troll
src: http://emojis.slackmojis.com/emojis/images/1463602125/429/troll.png
- name: stir_the_pot
src: http://emojis.slackmojis.com/emojis/images/1477429022/1276/stir_the_pot.gif
@KoCMoHaBTa
KoCMoHaBTa / OSStatus.swift
Last active February 9, 2023 11:57
OSStatus Utilities
//https://gist.github.com/KoCMoHaBTa/d90dd89c5af4f194848486e78fd39f96
import Foundation
let OSStatusErrorCodeMessageMapping: [OSStatus: String] = [
//the following lines are autogenerated trough OSStatusErrorCodeMessageMappingParser from swift's SecBase (CMD + click on any OSStatus code)
errSecSuccess: "errSecSuccess - No error.",
errSecUnimplemented: "errSecUnimplemented - Function or operation not implemented.",
#!/usr/bin/swift
import Foundation
//Sets the build number into a given Info.plist using the following format 1.2.3.456 where 456 is the build number. This also work if you have a single number for a build number, eg 567.
let usage = "Sets the build number into a given Info.plist using the following format 1.2.3.456 where 456 is the build number.\nThis also work if you have a single number for a build number, eg 567.\n\nUsage: set_build_number.swift <Info.plist path> <build number>\n"
extension String: Error {}
//
// URLEncodingUtilities.swift
// https://gist.github.com/KoCMoHaBTa/05396e94ed84cb70eb5abd0c91b8452f
//
// Created by Milen Halachev on 7/11/17.
// Copyright © 2016 Milen Halachev. All rights reserved.
//
import Foundation