Skip to content

Instantly share code, notes, and snippets.

#http://blog.jaredsinclair.com/post/97193356620/the-best-of-all-possible-xcode-automated-build
#
# 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/
#
# Updated with dSYM handling from http://yellowfeather.co.uk/blog/auto-incrementing-build-number-in-xcode-revisited/
#
@foundry
foundry / xcode-build-bump.sh
Created February 14, 2017 20:16 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build & Version Numbers
# 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)
//
// svm_hog.cpp
// OpenCVSamples
//
// Created by jonathan on 29/07/2015.
// Copyright (c) 2015 foundry. All rights reserved.
//
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "openCVUtils.h"
#include <iostream>
using namespace cv;
using namespace std;
static Mat _inImage;
static Mat _outImage;
@foundry
foundry / peopledetect.cpp
Last active February 5, 2021 11:18
OpenCV Hog Descriptor trial
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "openCVUtils.h"
using namespace cv;
@foundry
foundry / gist:d677255c07862c1dd044
Created June 8, 2015 16:59
crash reporting log-tastic
0 | 00:06:36:297 | $ +[WNMediaItem(Methods) urlKeyForSize:]166
1 | 00:06:36:305 | $ -[WNGalleryCell prepareForReuse]200{{0, 0}, {154, 154}}
2 | 00:06:36:309 | $ -[WNGalleryCell prepareForReuse]201-[WNGalleryCell prepareForReuse]
3 | 00:06:36:312 | $ -[WNMediaItemFetcher cancelNotification:]207
4 | 00:06:36:315 | $ +[WNMediaItem(Methods) photoSizeString:]183
5 | 00:06:36:318 | $ -[WNMediaItemFetcher cancelNotification:]209 mediaItemID: 38240EFA-48F6-4C38-9B51-378A34F25179 size: WNPhotoSizeMedium
6 | 00:06:36:320 | $ +[WNMediaItem(Methods) photoSizeString:]183
7 | 00:06:36:323 | $ -[WNMediaItemFetcher cancelNotification:]212userInfoID: D8490E9A-3110-4884-8B49-A1F0D6F26DFB size: WNPhotoSizeMedium
8 | 00:06:36:327 | $ -[WNGalleryCell setSelected:]86-[WNGalleryCell setSelected:] 0
9 | 00:06:36:329 | $ -[WNGalleryCell update]178-[WNGalleryCell update] mongoID 05EF13CE-7E27-474A-A11F-21CB973A37A2 localID (null)
@foundry
foundry / gist:b6b4cedbcaed86fdf434
Created June 8, 2015 11:20
Crashlytics logging macro
//
// WNLog.h
// testCrash
//
// Created by foundry on 08/06/2015.
// Copyright (c) 2015 foundry. All rights reserved.
//
#ifndef testCrash_WNLog_h
#define testCrash_WNLog_h
@foundry
foundry / Progressive image loading for iOS
Last active September 8, 2018 00:13
Progressive image loading for iOS. This is a GIST - detailed implementation is left as an exercise for the reader.
/*
typical usage (FYImageStore is a singleton)
[[FYImageStore instance] retrieveFullsizeImageFromPath:path
completion:^(UIImage* image){
self.imageView.image = image
}];
*/
#import "FYImageURL.h" //URL-building utilities, omitted from this Gist.
@foundry
foundry / gist:7169773
Created October 26, 2013 13:59
bash_profile additions to show your current git branch
:parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
PS1="\[\033[0;31m\]\h:\w\n\u\$(parse_git_branch)>\[\033[0m\] "