Skip to content

Instantly share code, notes, and snippets.

@sergeyzenchenko
sergeyzenchenko / Rakefile
Created January 9, 2012 12:00 — forked from rudyjahchan/Rakefile
Building and Deploying iOS Projects through Rake
require 'yaml'
require 'uri'
require 'tempfile'
require 'tmpdir'
SDK_DIR = "/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk"
TESTFLIGHT_URL = 'http://testflightapp.com/api/builds.json'
PROJECT_DIR = File.dirname __FILE__
RUBIOS_DIR = File.join(PROJECT_DIR, 'rubios')
@sergeyzenchenko
sergeyzenchenko / gist:1808252
Created February 12, 2012 12:24 — forked from farcaller/gist:1801278
Refactored macros from bitbucket.org/snej/myutilities
#define $array(OBJS...) ({id objs[]={OBJS}; \
[NSArray arrayWithObjects: objs count: sizeof(objs)/sizeof(id)];})
#define $marray(OBJS...) ({id objs[]={OBJS}; \
[NSMutableArray arrayWithObjects: objs count: sizeof(objs)/sizeof(id)];})
#define $mdict(PAIRS...) ( \
{id pairs[]={PAIRS}; \
NSMutableDictionary *d = [NSMutableDictionary dictionary]; \
int cnt = sizeof(pairs)/sizeof(id); \
@sergeyzenchenko
sergeyzenchenko / AppDelegate.m
Created October 11, 2012 11:07 — forked from xslim/AppDelegate.m
AFIncrementalStore with If-Modified-Since hack
// Connecting AFIncrementalStore & MagicRecord
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
PDDebugger *debugger = [PDDebugger defaultInstance];
[debugger connectToURL:[NSURL URLWithString:@"ws://localhost:9000/device"]];
[debugger enableNetworkTrafficDebugging];
[debugger forwardAllNetworkTraffic];
[debugger enableCoreDataDebugging];
@sergeyzenchenko
sergeyzenchenko / Instructions.md
Created November 29, 2012 16:13 — forked from alloy/Instructions.md
Run iOS unit tests (in a Xcode workspace) when a file changes and *only* those tests related to the changed file. Also trims otest output and colors test results.
#include <dispatch/dispatch.h>
typedef void (^MHChannelsBlock)(id sender, NSDictionary *dictionary);
/*!
* A "channel" is like a private NSNotificationCenter between just two objects
* (although more are possible).
*
* Instead of making your objects, such as two view controllers, communicate

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@sergeyzenchenko
sergeyzenchenko / reified-issue.kt
Created October 21, 2021 11:14
Kotlin reified generics issue
open class A {
}
open class B {
}
class Factory<R>(val mapper: () -> R) {
@sergeyzenchenko
sergeyzenchenko / russia-ddos.md
Last active October 14, 2024 20:06
Russia DDOS list