master 永远处于稳定状态,这个分支代码可以随时用来部署。不允许在该分支直接提交代码。
开发分支,包含了项目最新的功能和代码,所有开发都在 develop 上进行。一般情况下小的修改直接在这个分支上提交代码。
git diff --cached --name-status | while read st file; do | |
# skip deleted files | |
if [ "$st" == 'D' ]; then continue; fi | |
# do a check only on the puppet files | |
if [[ "$file" =~ ".pp" ]]· | |
then | |
echo "syntax checking \"$file\""· | |
if ! puppet --confdir=/tmp --vardir=/tmp --parseonly --ignoreimport "$file" | |
then | |
echo "puppet syntax check failed for file: $file" |
// | |
// LoadImage.h | |
// AssetsFromPDF | |
// | |
// Created by Jeffrey Sambells on 2012-03-02. | |
// | |
#import <Foundation/Foundation.h> | |
@interface LoadImage : NSObject |
- (UIImage *)imageWithColor:(UIColor *)color { | |
CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f); | |
UIGraphicsBeginImageContext(rect.size); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGContextSetFillColorWithColor(context, [color CGColor]); | |
CGContextFillRect(context, rect); | |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); |
+(CGFloat)pixelToPoints:(CGFloat)px { | |
CGFloat pointsPerInch = 72.0; // see: http://en.wikipedia.org/wiki/Point%5Fsize#Current%5FDTP%5Fpoint%5Fsystem | |
CGFloat scale = 1; // We dont't use [[UIScreen mainScreen] scale] as we don't want the native pixel, we want pixels for UIFont - it does the retina scaling for us | |
float pixelPerInch; // aka dpi | |
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { | |
pixelPerInch = 132 * scale; | |
} else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { | |
pixelPerInch = 163 * scale; | |
} else { | |
pixelPerInch = 160 * scale; |
########################################## | |
# | |
# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4 | |
# | |
# Version 2.82 | |
# | |
# Latest Change: | |
# - MORE tweaks to get the iOS 10+ and 9- working | |
# - Support iOS 10+ | |
# - Corrected typo for iOS 1-10+ (thanks @stuikomma) |
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list | |
# A list of available STUN server. | |
stun.l.google.com:19302 | |
stun1.l.google.com:19302 | |
stun2.l.google.com:19302 | |
stun3.l.google.com:19302 | |
stun4.l.google.com:19302 | |
stun01.sipphone.com | |
stun.ekiga.net |
#import <UIKit/UIKit.h> | |
#import <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
static UIImage *frameImage(CGSize size, CGFloat radians) { | |
UIGraphicsBeginImageContextWithOptions(size, YES, 1); { | |
[[UIColor whiteColor] setFill]; | |
UIRectFill(CGRectInfinite); | |
CGContextRef gc = UIGraphicsGetCurrentContext(); | |
CGContextTranslateCTM(gc, size.width / 2, size.height / 2); |
dispatch_semaphore_t semaphore = dispatch_semaphore_create(1); | |
// Then in some loop ... | |
if(dispatch_semaphore_wait(semaphore, DISPATCH_TIME_NOW) == 0) { | |
dispatch_async(queue, ^{ | |
// Some code that needs to run but doesn't need to fill up the queue. | |
// | |
dispatch_semaphore_signal(semaphore); | |
}); |
This process worked for me. I take no responsibility for any damage or loss incurred as a result of following or not following these steps or, for that matter, anything else you might do or not do.
svn.domain.com.au
.http
(other protocols should work).git.domain.com.au
and: