- Swift
- Objective-C
- C++/C
- JavaScript
- Mac OSX
- iOS
#!/bin/sh | |
if [ "$#" != 3 ]; then | |
echo "Illegal number of parameters, usage: ./make_cert.sh apn_file key_file output_filename" | |
fi | |
eval "openssl x509 -in $1.cer -inform DER -out $1.pem -outform PEM" | |
eval "openssl pkcs12 -nodes -export -inkey $2.key -in $1.pem -out $1.p12" | |
eval "openssl pkcs12 -nodes -nocerts -out $2.pem -in $1.p12" | |
eval "cat $1.pem $2.pem > $3.pem" |
#include "copyfile.h" | |
typedef enum { | |
_NotStarted = 0, | |
_InProgress, | |
_Finished, | |
} _State; | |
@implementation BAVAppDelegate | |
{ |
.section __TEXT,__text,regular,pure_instructions | |
.globl _insert | |
.align 4, 0x90 | |
_insert: ## @insert | |
.cfi_startproc | |
## BB#0: | |
pushq %rbp | |
Ltmp2: | |
.cfi_def_cfa_offset 16 | |
Ltmp3: |
/* ps -axco "pid= comm=" | awk '{printf "pnames[%s]", $1; $1=""; sub(/^ /, "", $0); printf " = \x22%s\x22;\n", $0}' > /tmp/pnames.h; sudo dtrace -C -I/tmp -s signals.d */ | |
#pragma D option quiet | |
dtrace:::BEGIN | |
{ | |
#include "pnames.h" | |
snames[0] = "_QUERY_"; | |
snames[1] = "SIGHUP"; |
#import <QuartzCore/QuartzCore.h> | |
@interface ArrowLayer : CALayer | |
@property (nonatomic) CGFloat thickness; | |
@property (nonatomic) CGFloat startRadians; | |
@property (nonatomic) CGFloat lengthRadians; | |
@property (nonatomic) CGFloat headLengthRadians; | |
@property (nonatomic, strong) UIColor *fillColor; |
- (BOOL)stringContainsEmoji:(NSString *)string { | |
__block BOOL returnValue = NO; | |
[string enumerateSubstringsInRange:NSMakeRange(0, [string length]) options:NSStringEnumerationByComposedCharacterSequences usingBlock: | |
^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) { | |
const unichar hs = [substring characterAtIndex:0]; | |
// surrogate pair | |
if (0xd800 <= hs && hs <= 0xdbff) { | |
if (substring.length > 1) { | |
const unichar ls = [substring characterAtIndex:1]; |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition: