This file contains 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
#!/usr/bin/env bash | |
# carthage.sh | |
set -euo pipefail | |
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX) | |
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT | |
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig |
This file contains 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
platform :ios, '10.0' | |
use_frameworks! | |
plugin 'cocoapods-rome', | |
:pre_compile => Proc.new { |installer| | |
installer.pods_project.targets.each do |target| | |
target.build_configurations.each do |config| | |
config.build_settings['SWIFT_VERSION'] = '5.0' | |
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0' | |
config.build_settings["ONLY_ACTIVE_ARCH"] = "YES" |
This file contains 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 collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | |
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: EmtyCell.name, for: indexPath) | |
var viewController = YourViewController() | |
cell.contentView.addSubview(viewController.view) | |
viewController.view.translatesAutoresizingMaskIntoConstraints = false | |
This file contains 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
let requestClosure = { (endpoint: Endpoint, done: MoyaProvider.RequestResultClosure) in | |
do { | |
let queryItemToken = URLQueryItem(name: "key", value: "value") | |
var request = try endpoint.urlRequest() | |
var url = request.url | |
request.url = URL.addQueryParams(url: url!, newParams: [queryItemToken])! | |
This file contains 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
#!/usr/bin/env bash | |
IPAFile=`find . -name *.ipa | head -1` | |
npm install -g appcenter-cli | |
appcenter login --token [login token] | |
appcenter distribute release -f $IPAFile -g Collaborators --app Punday/mondaypundayapp--ios |
This file contains 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/sh | |
rm -rf /Applications/Xcode.app | |
rm -rf /Library/Preferences/com.apple.dt.Xcode.plist | |
rm -rf ~/Library/Preferences/com.apple.dt.Xcode.plist | |
rm -rf ~/Library/Caches/com.apple.dt.Xcode | |
rm -rf ~/Library/Application Support/Xcode | |
rm -rf ~/Library/Developer/Xcode | |
rm -rf ~/Library/Developer/CoreSimulator |
This file contains 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
class UIActionReturnTextField: UITextField { | |
func addDoneCancelToolbar(onDone: (target: Any, action: Selector)? = nil, onCancel: (target: Any, action: Selector)? = nil) { | |
let onCancel = onCancel ?? (target: self, action: #selector(cancelButtonTapped)) | |
let onDone = onDone ?? (target: self, action: #selector(doneButtonTapped)) | |
let toolbar: UIToolbar = UIToolbar() | |
toolbar.barStyle = .default | |
toolbar.items = [ | |
UIBarButtonItem(title: "Cancel", style: .plain, target: onCancel.target, action: onCancel.action), | |
UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: self, action: nil), |
This file contains 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
struct Stack<T>: CustomStringConvertible { | |
var description: String { | |
let title = "==== Stack ==== \n" | |
let body = self.array.map{ "\($0)" }.reversed().joined(separator: "\n") | |
let end = "\n===============" | |
return title + body + end | |
} | |
private var array: [T] = [] | |
This file contains 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
Widget PlayerConnectWidget(double width,double height){ | |
return SingleChildScrollView( | |
child: Container( | |
margin: EdgeInsets.only(left: width*0.03,right: width*0.03,top: width*0.05), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.stretch, | |
mainAxisSize: MainAxisSize.min, | |
children: <Widget>[ |
This file contains 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
parse_git_branch() { | |
git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3 | |
} | |
git push origin $(parse_git_branch) |
OlderNewer