Skip to content

Instantly share code, notes, and snippets.

Videos

// ObservableBuffer.swift
//
// Created by Daniel Tartaglia
// Copyright © 2017 Daniel Tartaglia. MIT License.
extension Observable {
/// collects elements from the source sequence until the boundary sequence fires. Then it emits the elements as an array and begins collecting again.
func buffer<U>(_ boundary: Observable<U>) -> Observable<[E]> {
return Observable<[E]>.create { observer in
//
// Plugin.swift
//
//
import RIBs
import RxSwift
// MARK: - Plugin
@dangthaison91
dangthaison91 / WORKSPACE
Created May 28, 2021 09:47 — forked from sayrer/WORKSPACE
React Native Android in Bazel
# React Native Android
maven_aar(
name = "com_facebook_react_native",
artifact = "com.facebook.react:react-native:0.55.4",
settings = "//build:settings.xml",
deps = [
"@androidsdk//com.android.support:appcompat-v7-25.0.0",
"@com_facebook_fbui_textlayoutbuilder//aar",
"@com_facebook_fresco_fresco//aar",
@dangthaison91
dangthaison91 / HookUIApplicationMain.m
Created July 25, 2022 11:10 — forked from NSExceptional/HookUIApplicationMain.m
Hooking UIApplicationMain in Swift or Objc apps with Fishhook
// UIApplicationMain accepts Swift.String in Swift apps; a C forward declaration is needed
struct SwiftString {
uint8_t reserved[16];
};
typedef struct SwiftString SwiftString;
int (*orig_UIApplicationMain_objc)(int argc, char *argv[], NSString *_, NSString *delegateClassName) = nil;
int (*orig_UIApplicationMain_swift)(int argc, char *argv[], SwiftString _, SwiftString delegateClassName) = nil;
NSString *(*FoundationBridgeSwiftStringToObjC)(SwiftString str) = nil;