git ls-remote origin
to find pull request you want to merge. Usually their names start withrefs/pull-requests/$ID/from
(Atlassian Stash style) orrefs/pull/$ID/head
(GitHub style).git fetch origin refs/pull-requests/$ID/from
orgit fetch origin refs/pull/$ID/head
and work with the branch fromFETCH_HEAD
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 Money { | |
let currencyCode: String | |
let cents: Int | |
} | |
struct Cost { | |
let price: Money | |
let fee: Money | |
let total: Money | |
} |
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 Foundation | |
class StubHTTP: NSURLProtocol { | |
// MARK: - Public Interface | |
class func stubRequest(requestTest: NSURLRequest -> Bool, withResponse data: NSData) { | |
stubRequest(requestTest, withResponses: [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
/* | |
* This is an example provided by Facebook are for non-commercial testing and | |
* evaluation purposes only. | |
* | |
* Facebook reserves all rights not expressly granted. | |
* | |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | |
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL | |
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN |
There are several complaints regarding TeamCity build agent can't run tests in iOS Simulator all gathered in issue TW-38954 Agent started automatically on Yosemite could not launch iOS simulator.
Official workaround from JetBrains found on StackOverflow for this issue looks like this:
$ sh buildAgent/bin/agent.sh start
This means we should convert from automatic launch by launchd
to manual via Terminal.app. Side effect of this is no relaunch on agent crash or system reboot.
Further investigation on that issue has led me to the Apple Developer Forums topic where Apple engineer claims following about xcodebuild
:
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
readonly GIT_CORE='/Applications/Xcode.app/Contents/Developer/usr/share/git-core' | |
readonly GIT_BASH_COMPLETION="$GIT_CORE/git-completion.bash" | |
readonly GIT_PS1="$GIT_CORE/git-prompt.sh" | |
[ -f "$GIT_BASH_COMPLETION" ] && source "$GIT_BASH_COMPLETION" | |
if [ -f "$GIT_PS1" ] ; then | |
source "$GIT_PS1" | |
export PS1='[\A] $(tput setaf 2)\u$(tput sgr0):\w$(tput setaf 1)$(__git_ps1 " (%s)")$(tput sgr0) $ ' | |
else | |
export PS1="[\A] $(tput setaf 2)\u$(tput sgr0):\w $ " |
Patch flushDNSCache
function located in /Applications/Tunnelblick.app/Contents/Resources/client.up.tunnelblick.sh
with following code inside case
statement:
10.10 )
if [ -x /usr/sbin/discoveryutil ] ; then
/usr/sbin/discoveryutil mdnsflushcache
logMessage "Flushed the DNS Cache"
else
logMessage "/usr/sbin/discoveryutil not present. Not flushing the DNS cache"
fi
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
2.0.0-p247 :008 > Array(1..5).each_cons(2) { |first, second| puts "#{first}, #{second}" } | |
1, 2 | |
2, 3 | |
3, 4 | |
4, 5 | |
=> 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
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view, typically from a nib. | |
MKPlacemark *firstPlacemark = [[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2DMake(55.755768, 37.617671) | |
addressDictionary:nil]; | |
MKPlacemark *secondPlacemark = [[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2DMake(55.910528, 37.736339) | |
addressDictionary: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
#!/usr/bin/perl -w | |
# Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# | |
# 1. Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |