Skip to content

Instantly share code, notes, and snippets.

View jaminguy's full-sized avatar

Jamin Guy jaminguy

View GitHub Profile
javascript:location.href=%27riposte://x-callback-url/createNewPost?text=%27+encodeURIComponent(document.title)+%27%20%27+encodeURIComponent(window.location.href)
extension String {
subscript (i: Int) -> Character {
return self[self.startIndex.advancedBy(i)]
}
subscript (i: Int) -> String {
return String(self[i] as Character)
}
import Foundation
import UIKit
protocol ViewControllerContaining {
var containerView: UIView! { get set }
func addViewController(childViewController: UIViewController)
func removeViewController(childViewController: UIViewController)
func addChildViewController(childController: UIViewController)
}
So first, archive your app. In Xcode Organizer, right click your archive and reveal it in finder. Right click the now-revealed archive and click show package contents. Then go Products > Applications > Right Click your app and show package contents again. Now, the magic begins. Find your info.plist file. Open it in Xcode, and locate the line that says “BuildMachineOSBuild”. Alter the string from whatever it is to “14F27”. This is the Build ID for Yosemite. Safe the file, and now you should be all set to sumbit!
let replaced = String(aString.characters.map {
$0 == " " ? "+" : $0
})
/* No comment provided by engineer. */
" and " = " and ";
/* No comment provided by engineer. */
" at " = " at ";
/* No comment provided by engineer. */
"%20from%20" = "%1$from%2$";
/* No comment provided by engineer. */
#
# Set the build number to the current git commit count.
# If we're using the Dev scheme, then we'll suffix the build
# number with the current branch name, to make collisions
# far less likely across feature branches.
# Based on: http://w3facility.info/question/how-do-i-force-xcode-to-rebuild-the-info-plist-file-in-my-project-every-time-i-build-the-project/
#
git=`sh /etc/profile; which git`
appBuild=`"$git" rev-list --all |wc -l`
if [ $CONFIGURATION = "Debug" ]; then
<key>NSAppTransportSecurity</key>
<dict>
<!--Include to allow all connections (DANGER)-->
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
@jaminguy
jaminguy / ios_9_hide_toolbar.m
Created August 7, 2015 20:45
iOS 9 - Hide top keyboard toolbar
if ([textField respondsToSelector:@selector(inputAssistantItem)]) {
UITextInputAssistantItem *inputAssistantItem = [textField inputAssistantItem];
inputAssistantItem.leadingBarButtonGroups = @[];
inputAssistantItem.trailingBarButtonGroups = @[];
}
@jaminguy
jaminguy / gist:4db6e2ee96302de30e80
Created May 26, 2015 19:11
Xcode run script to increment build number based on git commits
#
# Set the build number to the current git commit count.
# If we're using the Dev scheme, then we'll suffix the build
# number with the current branch name, to make collisions
# far less likely across feature branches.
# Based on: http://w3facility.info/question/how-do-i-force-xcode-to-rebuild-the-info-plist-file-in-my-project-every-time-i-build-the-project/
#
git=`sh /etc/profile; which git`
appBuild=`"$git" rev-list --all |wc -l`
if [ $CONFIGURATION = "Debug" ]; then