create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| #!/bin/bash | |
| set -ex | |
| # This scripts allows you to upload a binary to the iTunes Connect Store and do it for a specific app_id | |
| # Because when you have multiple apps in status for download, xcodebuild upload will complain that multiple apps are in wait status | |
| # Requires application loader to be installed | |
| # See https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/SubmittingTheApp.html | |
| # Itunes Connect username & password | |
| USER=bla |
| import Foundation | |
| import CryptoSwift | |
| extension String { | |
| func aesEncrypt(key: String, iv: String) -> String { | |
| let data = self.dataUsingEncoding(NSUTF8StringEncoding) | |
| let enc = AES(key: key, iv: iv, blockMode:.CBC)?.encrypt(data!.arrayOfBytes(), padding: PKCS7()) | |
| let encData = NSData(bytes: enc!, length: Int(enc!.count)) | |
| let base64String: String = encData.base64EncodedStringWithOptions(NSDataBase64EncodingOptions(rawValue: 0)); |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| class Color(object): | |
| """ | |
| reference from https://gist.github.com/Jossef/0ee20314577925b4027f and modified bit. | |
| """ | |
| def __init__(self, text, **user_styles): |
| def color(text, **user_styles): | |
| styles = { | |
| # styles | |
| 'reset': '\033[0m', | |
| 'bold': '\033[01m', | |
| 'disabled': '\033[02m', | |
| 'underline': '\033[04m', | |
| 'reverse': '\033[07m', |
| // CalculatorView.swift | |
| // as seen in http://nshipster.com/ibinspectable-ibdesignable/ | |
| // | |
| // (c) 2015 Nate Cook, licensed under the MIT license | |
| /// The alignment for drawing an String inside a bounding rectangle. | |
| enum NCStringAlignment { | |
| case LeftTop | |
| case CenterTop | |
| case RightTop |
| # Convert the .cer file into a .pem file: | |
| $ openssl x509 -in aps_development.cer -inform der -out PushChatCert.pem | |
| # Convert the private key’s .p12 file into a .pem file: | |
| $ openssl pkcs12 -nocerts -in PushChatKey.p12 -out PushChatKey.pem | |
| # Finally, combine the certificate and key into a single .pem file | |
| $ cat PushChatCert.pem PushChatKey.pem > ck.pem | |
| # At this point it’s a good idea to test whether the certificate works. |
| @interface Model (AdditionalParam) | |
| @property (nonatomic, strong) NSString <Optional> * new_key_name; | |
| @end |
| - (void)setMaskImage { | |
| CALayer *mask = [CALayer layer]; | |
| mask.contents = (id)[[UIImage imageNamed:@"infoLogo"] CGImage]; | |
| mask.frame = self.imgItem.bounds; | |
| self.imgItem.layer.mask = mask; | |
| self.imgItem.layer.masksToBounds = YES; | |
| self.imgItem.contentMode = UIViewContentModeCenter; | |
| } |
| - (CGPathRef)renderRect:(UIView*)imgView { | |
| UIBezierPath *path = [UIBezierPath bezierPathWithRect:imgView.bounds]; | |
| return path.CGPath; | |
| } | |
| - (CGPathRef)renderTrapezoid:(UIView*)imgView { | |
| CGSize size = imgView.bounds.size; | |
| UIBezierPath *path = [UIBezierPath bezierPath]; | |
| [path moveToPoint:CGPointMake(size.width * 0.33f, size.height * 0.66f)]; |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"