This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pre-requirements: | |
* cmake | |
* zlib | |
* libjpeg | |
* libogg | |
* libvorbis | |
* openal-soft | |
* sdl2 | |
Installation: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'dart:isolate'; | |
typedef IsolateEnvironmentEntryPoint(SendPort sendPort, ReceivePort receivePort); | |
class IsolateEnvironment { | |
Isolate isolate; | |
ReceivePort receivePort; | |
SendPort sendPort; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
readonly MODULEMAP="${PODS_ROOT}/TwitterCore/iOS/TwitterCore.framework/Modules/module.private.modulemap" | |
readonly HEADER="${PODS_ROOT}/TwitterCore/iOS/TwitterCore.framework/Headers/TwitterCore.h" | |
if ! grep -q "TwitterCore_Private" "${MODULEMAP}"; then | |
cat >"${MODULEMAP}" <<EOL | |
module TwitterCore_Private { | |
} | |
EOL | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
readonly disk_path="$(hdid -nomount ram://7800000)" | |
readonly disk_number="$(echo $disk_path | sed 's|/dev/disk||g')" | |
echo $disk_number | |
newfs_hfs -v "DerivedData" "/dev/rdisk$disk_number" | |
diskutil mount -mountPoint ~/Library/Developer/Xcode/DerivedData "/dev/disk$disk_number" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIView { | |
func configureBorder(_ roundCorners:UIRectCorner, cornerRadius: CGFloat, borderColor: UIColor, borderWidth: CGFloat) { | |
let path = UIBezierPath(roundedRect: bounds, | |
byRoundingCorners: roundCorners, | |
cornerRadii: CGSize(width: cornerRadius, height: cornerRadius)) | |
let mask = CAShapeLayer() | |
mask.path = path.cgPath | |
mask.borderColor = UIColor.white.cgColor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Скрипт для автоматического юнит-тестирования iOS-проектов | |
# ТРЕБОВАНИЯ: | |
# Требуется наличие гема xcpretty (https://github.com/supermarin/xcpretty) | |
# Установка: sudo gem install xcpretty | |
# РЕЗУЛЬТАТ: | |
# В результате выполнения формируется каталог, имя которого содержит дату и время запуска скрипта REPORT_PATH, который содержит | |
# - zip-архив с результатами выполнения скрипта в родном формате XCode | |
# - log-файл, содержащий полный консольный вывод сборки выполнения тестов |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class PlaceholderTextView: UITextView { | |
@IBInspectable var placeholderColor: UIColor = UIColor.lightGray | |
@IBInspectable var placeholderText: String = "" | |
override var font: UIFont? { | |
didSet { | |
setNeedsDisplay() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func htmlAsString()-> String? { | |
var result: String? | |
webView.evaluateJavaScript("document.documentElement.outerHTML.toString()") { (html: Any?, error: Error?) in | |
result = html as? String | |
} | |
return result | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import UIKit | |
extension UIView { | |
class Indicator: UIView { | |
} | |
NewerOlder