Skip to content

Instantly share code, notes, and snippets.

View AlexDenisov's full-sized avatar
🇺🇦
Talking to Machines

Alex Denisov AlexDenisov

🇺🇦
Talking to Machines
View GitHub Profile
; ModuleID = '1'
target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
target triple = "armv7-apple-ios9.0"
%0 = type opaque
%1 = type opaque
%2 = type opaque
%3 = type opaque
%4 = type opaque
%"__type_hidden#0" = type { %"__type_hidden#0"*, %"__type_hidden#0"*, %"__type_hidden#1"*, %"__type_hidden#1"*, i32 }

Keybase proof

I hereby claim:

  • I am AlexDenisov on github.
  • I am alexdenisov (https://keybase.io/alexdenisov) on keybase.
  • I have a public key whose fingerprint is 9C3C BEE7 5BD9 38BF D931 6099 A9D9 5F61 584A 75FA

To claim this, I am signing this object:

#!/bin/sh
#
# Converts branch name 'MAPP-452_how-is-it-going' into a commit message 'MAPP-452 How is it going'
#
if ! [ -z $2 ]
then
if ! [ "message" == $2 ]
then
func funcWithBlock(block: () -> () ) -> Int {
block()
return 0
}
class Foo {
var _ = funcWithBlock {
println("hello")
}
}
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);
@AlexDenisov
AlexDenisov / Makefile
Last active January 1, 2016 16:09
Flex/Bison studying.
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
@AlexDenisov
AlexDenisov / cocoapods_vs_static_lib.sh
Created December 17, 2013 05:06
CocoaPods vs Static Library
$ 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
#import <Foundation/Foundation.h>
int main()
{
NSLog(@"%@", @(13));
return 0;
}
- (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);
}
@AlexDenisov
AlexDenisov / spec_arc_support.rb
Created March 27, 2013 14:51
Add compiler flags on each Spec in target
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