Generates PDF from man page and opens it within Preview.app.
curl -o /usr/local/bin/pman https://gist.githubusercontent.com/AlexDenisov/4294335/raw/9fe40c81f6fc94760e81040d2636d0e703fc676f/pman.pl
chmod +x /usr/local/bin/pman
use List::MoreUtils qw( each_array ); | |
my @first = qw( foo bar buzz ); | |
my @second = (1, 2, 3); | |
my $it = each_array( @first, @second ); | |
while ( my ($f, $s) = $it->() ) { | |
print "$f = $s\n"; | |
} |
// | |
// ConformsTo.h | |
// | |
// Created by Alex Denisov on 01.03.13. | |
// | |
#pragma once | |
#import <Foundation/Foundation.h> | |
#import <Cedar-iOS/Cedar-iOS.h> |
#include <iostream> | |
#include <set> | |
using namespace std; | |
struct Point { | |
int x; | |
int y; | |
Point(int x, int y) |
require 'xcodeproj' | |
project = Xcodeproj::Project.new 'SomeProject.xcodeproj' | |
target = project.targets.last | |
build_phase = target.source_build_phase | |
files = build_phase.files | |
settings = { 'COMPILER_FLAGS' => '-fno-objc-arc' } | |
files.each do |f| | |
if f.display_name =~ /Spec/ | |
if f.settings |
- (void)printWithFormat:(NSString *)format arguments:(NSArray *)arguments | |
{ | |
NSRange range = NSMakeRange(0, [arguments count]); | |
NSMutableData * data = [NSMutableData dataWithLength:sizeof(id) * [arguments count]]; | |
[arguments getObjects:(__unsafe_unretained id *)data.mutableBytes range:range]; | |
NSString * result = [[NSString alloc] initWithFormat:format | |
arguments:data.mutableBytes]; | |
NSLog(@"%@", result); | |
} |
#import <Foundation/Foundation.h> | |
int main() | |
{ | |
NSLog(@"%@", @(13)); | |
return 0; | |
} |
$ time xcodebuild -workspace ./BloodMagic.xcworkspace -scheme BloodMagic -config Debug -sdk iphonesimulator | |
# 40.31s user 4.15s system 288% cpu 15.435 total | |
$ time xcodebuild -project BloodMagic.xcodeproj -target BloodMagic -sdk iphonesimulator -configuration Debug build ARCHS=i386 | |
# 18.64s user 2.31s system 282% cpu 7.404 total |
all: calc | |
calc: parser lexer | |
CC lexer.c parser.c -o calc | |
lexer: | |
flex -o lexer.c lexer.l | |
parser: | |
bison -d -o parser.c parser.y |
std::ostream& operator << (std::ostream& os, NSString *string); | |
std::ostream& operator << (std::ostream& os, UIEdgeInsets edgeInsets); | |
std::ostream& operator << (std::ostream& os, CGSize size); | |
std::ostream& operator << (std::ostream& os, CGPoint point); | |
std::ostream& operator << (std::ostream& os, CGRect rect); | |
std::ostream& operator << (std::ostream& os, SEL selector); | |
std::ostream& operator << (std::ostream& os, Class cls); | |
std::ostream& operator << (std::ostream& os, BOOL boolean); |