I hereby claim:
- I am onevcat on github.
- I am onevcat (https://keybase.io/onevcat) on keybase.
- I have a public key whose fingerprint is A151 8725 F27D B82C 0655 EE81 E228 6724 C063 4366
To claim this, I am signing this object:
# Remove Book | |
movl L_OBJC_SELECTOR_REFERENCES_13-L1$pb(%ebx), %eax | |
movl %eax, -36(%ebp) ## 4-byte Spill | |
movl %eax, 4(%esp) | |
movl %edi, (%esp) | |
movl $0, 8(%esp) | |
calll L_objc_msgSend$stub | |
//Workaround for Unity game slowing in iPhone4 + 7.1 | |
//Write in main.mm | |
#include <pthread.h> | |
#include <dlfcn.h> | |
typedef int (*pthread_create_f)(pthread_t * __restrict, const pthread_attr_t * __restrict, void *(*)(void *), void * __restrict); | |
static pthread_create_f real_create = NULL; | |
extern "C" int pthread_create(pthread_t * __restrict thread, const pthread_attr_t * __restrict attr, void *(*start)(void *), void * __restrict arg) |
extension String | |
{ | |
subscript(integerIndex: Int) -> Character | |
{ | |
let index = advance(startIndex, integerIndex) | |
return self[index] | |
} | |
subscript(integerRange: Range<Int>) -> String | |
{ |
using UnityEngine; | |
public static class MonoBehaviorInvokeMethodExtension { | |
public static void Invoke(this MonoBehaviour m, System.Action method, float time) { | |
string methodName = method.Method.Name; | |
m.Invoke(methodName, time); | |
} | |
} |
func Test<T>(input : T, condition : T -> Bool = {t in return true}) -> T { | |
if condition(input) { | |
return input | |
} else { | |
return input | |
} | |
} | |
let a = Test(1) |
I hereby claim:
To claim this, I am signing this object:
// | |
// Task.swift | |
// fasfa | |
// | |
// Created by 王 巍 on 14-8-21. | |
// Copyright (c) 2014年 OneV's Den. All rights reserved. | |
// | |
import Foundation | |
typealias Task = (cancel : Bool) -> () |
dispatch_async(dispatch_get_main_queue(),^{ | |
[[NSNotificationCenter defaultCenter] postNotificationName:@"ImageRetrieved" | |
object:nil | |
userInfo:imageDict]; | |
}); |
private let concurrentPhotoQueue = dispatch_queue_create("com.onevcat.photoQueue", DISPATCH_QUEUE_CONCURRENT) | |
private var _photos: [Photo] = [] | |
var photos: [Photo] { | |
var photosCopy : [Photo]! | |
dispatch_sync(concurrentPhotoQueue) { | |
photosCopy = self._photos | |
} | |
return photosCopy | |
} |
syscall::read:entry | |
/execname != "iTerm"/ | |
{ | |
printf ("%s called read, asking for %d bytes\n", execname, arg2); | |
} | |
syscall::open*:entry | |
/execname == "backupd"/ | |
{ | |
printf ("%s", copyinstr(arg0)); |