Variable |
Type |
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
defaults write xcodebuild PBXNumberOfParallelBuildSubtasks 4 | |
defaults write xcodebuild IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4 | |
defaults write com.apple.xcode PBXNumberOfParallelBuildSubtasks 4 | |
defaults write com.apple.xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4 |
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/python | |
# fix-xcode | |
# Rob Napier <[email protected]> | |
# Script to link in all your old SDKs every time you upgrade Xcode | |
# Create a directory called /SDKs (or modify source_path). | |
# Under it, put all the platform directories: | |
# MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform | |
# Under those, store the SDKs: |
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
// The trick is to link the DeviceSupport folder from the beta to the stable version. | |
// Updated on Jan 24th, 2017 for Xcode 8.3b1 | |
ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.3\ \(14E5230d\)/ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
// Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
// sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) |
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
/* | |
One of the first things someone new to iOS Development finds is that dealing with the keyboard is trickier | |
than they think it should be. Simply changing the scrolling extents of a UITableView (or UIScrollView, or | |
UICollectionView) that is partially covered by they keyboard reveals a lot about the internals of how iOS | |
works and highlights various "gotchas" that need to be considered. | |
There are various ways to know that a keyboard has been shown - but observing some specific notifications | |
provides a reliable way to allow you to modify your views to deal with it. |
These are notes while researching a way to convert a browser/website to a stream. This could be used for Facebook Live or for webrecording. TL'DR:
- I started with Phantomjs - but that didn't support the html5 video tag
- SlimerJS supports it, but there is no way to record audio directly (though this might come from desktop audio)
- So I moved to research ffmpeg/X11/XVFB to record it with linux which works
- But ffmpeg has no easy way to mix streams/overlays to I moved on to OBS with overlay browser support
- I started researching options OBS in docker and it needed best a GPU , so I move to nvidia-docker
- And so came across building game servers on EC2/AWS using GPUs and managed to run OBS inside of GPU g2x.large machine
- I tried streaming to twich , which works great and managed to restream 4K 60FPS youtube on an AWS instance
- Remote control works through OBS-Remote but OBS has kinda limit in types of features
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
import UIKit | |
public struct TextStyle { | |
let font: UIFont | |
let color: UIColor | |
let kerning: CGFloat? | |
let lineHeight: CGFloat? | |
} |
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
import UIKit | |
public struct TextStyle { | |
let font: UIFont | |
let color: UIColor | |
let kerning: CGFloat? | |
let lineHeight: CGFloat? | |
} |
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
public enum ImageFormat { | |
case png | |
case jpeg(CGFloat) | |
} | |
extension UIImage { | |
public func base64(format: ImageFormat) -> String? { | |
var imageData: Data? |
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
//: Playground - noun: a place where people can play | |
// | |
// The result is not guaranteed to be accurate. Typically, the function requires 200-400 characters to reliably guess the language of a string. | |
// Reference: [CFStringTokenizerCopyBestStringLanguage(_:_:)](https://developer.apple.com/reference/corefoundation/1542136-cfstringtokenizercopybeststringl) | |
// | |
import Foundation | |
extension String { | |
func guessLanguage() -> String { |