Skip to content

Instantly share code, notes, and snippets.

View nzhuk's full-sized avatar

Nikita Zhuk nzhuk

View GitHub Profile

Keybase proof

I hereby claim:

  • I am nzhuk on github.
  • I am nzhuk (https://keybase.io/nzhuk) on keybase.
  • I have a public key whose fingerprint is DA03 0148 D8BE CEB3 527A 7A3F 2058 85CC B3EA BA1D

To claim this, I am signing this object:

@nzhuk
nzhuk / Macros.h
Created March 15, 2014 19:18 — forked from steipete/Macros.h
#ifndef NS_DESIGNATED_INITIALIZER
#if __has_attribute(objc_designated_initializer)
#define NS_DESIGNATED_INITIALIZER __attribute((objc_designated_initializer))
#else
#define NS_DESIGNATED_INITIALIZER
#endif
#endif
@nzhuk
nzhuk / boost.sh
Created February 11, 2014 14:06 — forked from rsobik/boost.sh
#===============================================================================
# Filename: boost.sh
# Author: Pete Goodliffe
# Copyright: (c) Copyright 2009 Pete Goodliffe
# Licence: Please feel free to use this, with attribution
# Modified version
#===============================================================================
#
# Builds a Boost framework for the iPhone.
# Creates a set of universal libraries that can be used on an iPhone and in the
nzhuk@nzhuk1:~$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 2
model name : QEMU Virtual CPU version 0.14.1
stepping : 3
cpu MHz : 2400.035
cache size : 4096 KB
fpu : yes
@nzhuk
nzhuk / gist:6578812
Created September 16, 2013 10:08
Share this with iOS native Facebook sharing
- (IBAction)share:(id)sender
{
NSURL *url = [NSURL URLWithString:@"https://itunes.com/apps/apple/pages"];
UIActivityViewController *vc = [[UIActivityViewController alloc] initWithActivityItems:@[url] applicationActivities:nil];
[self presentViewController:vc animated:YES completion:nil];
}
testing aaadddggg
@nzhuk
nzhuk / gist:1870147
Created February 20, 2012 17:09
Benchmarking mercurial 2.1 on OS X 10.7.3 (MacBookPro, 2.4 GHz i5, SSD). 10 001 branches, 70 008 topological heads.
$ time hg branches -c | wc -l
10001
real 0m6.677s
user 0m6.167s
sys 0m0.508s
$ time hg heads -t | wc -l
@nzhuk
nzhuk / gist:1862529
Created February 19, 2012 07:59
clang 3.1 preprocessor inserts extra spaces?
$ cat foo.h
#define VALUE 2012-02-19
Output: VALUE
$ clang -E -P foo.h
Output: 2012 -02 -19
$ gcc -E -P foo.h
@nzhuk
nzhuk / gist:1817176
Created February 13, 2012 14:10
SourceTree 1.3.1 crash
Process: SourceTree [21840]
Path: /Applications/SourceTree.app/Contents/MacOS/SourceTree
Identifier: com.torusknot.SourceTree
Version: 1.3.1 (1.3.1)
App Item ID: 411678673
App External ID: 6209231
Code Type: X86-64 (Native)
Parent Process: launchd [129]