create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
I have a process for fixing bugs in tagged releases, but it always seems such a faff. This makes | |
me think I'm doing it wrong. So imagine this scenario: | |
- I tag a release (v1) and push it onto staging | |
- I continue work in master | |
- Client comes back with an issue on v1 | |
- I create a branch based off v1 | |
- I fix the bug | |
- ... |
find . \( \( -name "*.[chm]" -o -name "*.mm" \) -o -name "*.cpp" \) -print0 | xargs -0 egrep -n '^\w*\#' | egrep -v '(import|pragma|else|endif|HC_SHORTHAND|MOCKITO_SHORTHAND)' |
define([ | |
'backbone', | |
'underscore', | |
'project/views/form' | |
], function(Backbone, _, ProjectFormView) { | |
var View = Backbone.View.extend({ | |
events: { | |
'submit form': 'submit' | |
}, |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
######################### | |
# .gitignore file for Xcode4 and Xcode5 Source projects | |
# | |
# Apple bugs, waiting for Apple to fix/respond: | |
# | |
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
# | |
# Version 2.6 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# |
//Override UICollectionViewFlowLayout class | |
@interface FixedHeaderLayout : UICollectionViewFlowLayout | |
@end | |
@implementation FixedHeaderLayout | |
//Override shouldInvalidateLayoutForBoundsChange to require a layout update when we scroll | |
- (BOOL) shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds { | |
return YES; | |
} |
public static UIImage FixOrientation(this UIImage image) | |
{ | |
UIImage fixedImage = image; | |
// No-op if the orientation is already correct | |
if (image.Orientation == UIImageOrientation.Up) return image; | |
// We need to calculate the proper transformation to make the image upright. | |
// We do it in 2 steps: Rotate if Left/Right/Down, and then flip if Mirrored. | |
CGAffineTransform transform = CGAffineTransform.MakeIdentity(); |
operator infix --> {} | |
func --> (instance: Any, key: String) -> Any? { | |
let mirror = reflect(instance) | |
for index in 0 ..< mirror.count { | |
let (childKey, childMirror) = mirror[index] | |
if childKey == key { | |
return childMirror.value | |
} | |
} |
// (c) 2014 Nate Cook, licensed under the MIT license | |
// | |
// Fisher-Yates shuffle as top-level functions and array extension methods | |
/// Shuffle the elements of `list`. | |
func shuffle<C: MutableCollectionType where C.Index == Int>(inout list: C) { | |
let c = count(list) | |
for i in 0..<(c - 1) { | |
let j = Int(arc4random_uniform(UInt32(c - i))) + i | |
swap(&list[i], &list[j]) |