Skip to content

Instantly share code, notes, and snippets.

View akolov's full-sized avatar

Alexander Kolov akolov

View GitHub Profile
@akolov
akolov / convert-to-xcframework.sh
Last active January 20, 2022 05:09
Convert a Framework into XCFramework
#!/usr/bin/env bash
set -e
SOURCE="$1"
if [[ -z "${SOURCE}" ]]; then
ME=$(basename "$0")
echo "Syntax: ${ME} Static.framework"
@akolov
akolov / TestCase.swift
Created September 18, 2014 12:37
Testing for XCTAssertThrows in Swift
class ExceptionTestCase: XCTestCase {
func raisesException() {
var exception = NSException(name: NSInternalInconsistencyException, reason: "Testing exceptions", userInfo: nil)
XCTAssertThrows({ exception.raise() }, "Should raise an exception)
XCTAssertThrowsSpecific({ exception.raise() }, NSInternalInconsistencyException, "Should raise NSInternalInconsistencyException")
}
}
@akolov
akolov / transcoder.py
Last active December 16, 2015 11:59
Transcodes file to m4v, adds stereo aac track for every ac3 or dts track
#!/usr/bin/env python
import argparse
import logging
import os
import re
import subprocess
from itertools import islice