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
# Basic Strongswan ikev2 server setup | |
* paltform: atlantic.net ubuntu 14.04 x64 | |
* the commands below are run with root account | |
## Strongswan | |
``` | |
apt-get install strongswan | |
apt-get install iptables iptables-persistent | |
``` |
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 | |
import Security | |
private let keychainQueue = dispatch_queue_create("networking.keychain", DISPATCH_QUEUE_CONCURRENT) | |
public class Keychain { | |
private let service: String | |
public init(service: String) { | |
self.service = service | |
} |
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
➜ ~ pod --version | |
0.33.1 | |
➜ ~ pod spec lint https://raw.githubusercontent.com/iAsync/iAsyncLite/master/podspecs/iAsyncLiteScheduler.podspec --verbose | |
> iAsyncLiteScheduler | |
iAsyncLiteScheduler (0.3.1) - Analyzing on iOS 6.0 platform. | |
Analyzing dependencies |
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 UIKit | |
typealias ColorDef = UInt32 | |
extension UIColor { | |
convenience init(_ colorDef: ColorDef) { | |
self.init(colorDef: colorDef) | |
} | |
convenience init(colorDef: ColorDef) { | |
self.init(colorDef: colorDef, alpha: 1.0) |
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
static __attribute__((always_inline)) CCCryptorStatus AES128Run(CCOperation operation, NSData *inData, NSData *key, NSData *__autoreleasing *outData) { | |
CCCryptorStatus status = kCCParamError; | |
if (outData != NULL) { | |
CCCryptorRef cryptor = NULL; | |
//correct key length | |
NSMutableData *correctedKey = [key mutableCopy]; | |
if ([key length] <= kCCKeySizeAES128) { | |
[correctedKey setLength:kCCKeySizeAES128]; |
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
24a25 | |
> "keychain|k=s", | |
156a158,162 | |
> if ( $opt{keychain} ) { | |
> push(@codesign_args, '--keychain'); | |
> push(@codesign_args, $opt{keychain}); | |
> } | |
> | |
268c274 | |
< PackageApplication [-s signature] application [-o output_directory] [-verbose] [-plugin plugin] || -man || -help |
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/Foundation.h> | |
@interface NSString (Mod97Check) | |
- (BOOL)passesMod97Check; // Returns result of mod 97 checking algorithm. Might be used to check IBAN. | |
// Expects string to contain digits and/or upper-/lowercase letters; space and all the rest symbols are not acceptable. | |
@end |
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
/*/../bin/ls > /dev/null | |
COMPILED=${0%.*} | |
clang $0 -o $COMPILED -framework Foundation; | |
$COMPILED; rm $COMPILED; exit; | |
*/ | |
#import <Foundation/Foundation.h> | |
int main(int argc, char *argv[]) |
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/Foundation.h> | |
#import <Security/Security.h> | |
int main(int argc, const char *argv[]) { | |
NSUserDefaults *arguments = [NSUserDefaults standardUserDefaults]; | |
NSString *file = [arguments stringForKey:@"f"]; | |
NSString *option = [arguments stringForKey:@"o"]; | |
if (!file) { | |
printf("\ |
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
pop = 0x5d | |
ret = 0xc3 | |
doc = Document.getCurrentDocument() | |
seg = doc.getCurrentSegment() | |
addr = doc.getCurrentAddress() | |
seg.writeByte(addr, pop) | |
seg.markAsCode(addr) |
NewerOlder